]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Move PyObject_Malloc and PyObject_Free to obmalloc.c.
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>
Fri, 12 Apr 2002 03:08:42 +0000 (03:08 +0000)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>
Fri, 12 Apr 2002 03:08:42 +0000 (03:08 +0000)
Objects/object.c

index 6cb57470c560c4af763d36b7e6db4f1b04999dad..609083875857b4e3d8fec3d7988bc456f1e7b2f9 100644 (file)
@@ -137,6 +137,8 @@ _PyObject_NewVar(PyTypeObject *tp, int nitems)
        return PyObject_INIT_VAR(op, tp, nitems);
 }
 
+/* for binary compatibility with 2.2 */
+#undef _PyObject_Del
 void
 _PyObject_Del(PyObject *op)
 {
@@ -1916,27 +1918,6 @@ PyMem_Free(void *p)
 }
 
 
-/* Python's object malloc wrappers (see objimpl.h) */
-
-void *
-PyObject_Malloc(size_t nbytes)
-{
-       return PyObject_MALLOC(nbytes);
-}
-
-void *
-PyObject_Realloc(void *p, size_t nbytes)
-{
-       return PyObject_REALLOC(p, nbytes);
-}
-
-void
-PyObject_Free(void *p)
-{
-       PyObject_FREE(p);
-}
-
-
 /* These methods are used to control infinite recursion in repr, str, print,
    etc.  Container objects that may recursively contain themselves,
    e.g. builtin dictionaries and lists, should used Py_ReprEnter() and