diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2002-04-12 03:08:42 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2002-04-12 03:08:42 (GMT) |
commit | bdf0eedb680898967e21eec99fb412e1140b1961 (patch) | |
tree | 9dda22cacb98b7aeb46a1bb8cb86df77de834b37 /Objects/object.c | |
parent | 58aa861fa2cb77abbafa3f7f2f16e8dd5ce02f9d (diff) | |
download | cpython-bdf0eedb680898967e21eec99fb412e1140b1961.zip cpython-bdf0eedb680898967e21eec99fb412e1140b1961.tar.gz cpython-bdf0eedb680898967e21eec99fb412e1140b1961.tar.bz2 |
Move PyObject_Malloc and PyObject_Free to obmalloc.c.
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/Objects/object.c b/Objects/object.c index 6cb5747..6090838 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -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 |