Index: Include/objimpl.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v retrieving revision 2.48 diff -u -r2.48 objimpl.h --- Include/objimpl.h 28 Mar 2002 21:06:16 -0000 2.48 +++ Include/objimpl.h 29 Mar 2002 20:59:59 -0000 @@ -269,9 +269,9 @@ #else /* !WITH_CYCLE_GC */ -#define PyObject_GC_New PyObject_New -#define PyObject_GC_NewVar PyObject_NewVar -#define PyObject_GC_Del PyObject_Del +#define PyObject_GC_New PyMalloc_New +#define PyObject_GC_NewVar PyMalloc_NewVar +#define PyObject_GC_Del PyMalloc_Del #define _PyObject_GC_TRACK(op) #define _PyObject_GC_UNTRACK(op) #define PyObject_GC_Track(op) Index: Modules/arraymodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/arraymodule.c,v retrieving revision 2.68 diff -u -r2.68 arraymodule.c --- Modules/arraymodule.c 4 Mar 2002 09:38:52 -0000 2.68 +++ Modules/arraymodule.c 29 Mar 2002 20:59:59 -0000 @@ -1719,7 +1719,7 @@ 0, /* tp_init */ PyType_GenericAlloc, /* tp_alloc */ array_new, /* tp_new */ - _PyObject_Del, /* tp_free */ + _PyMalloc_Del, /* tp_free */ }; /* No functions in array module. */ Index: Modules/socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.212 diff -u -r1.212 socketmodule.c --- Modules/socketmodule.c 25 Mar 2002 22:23:53 -0000 1.212 +++ Modules/socketmodule.c 29 Mar 2002 21:00:00 -0000 @@ -2714,7 +2714,7 @@ PySocketSock_Type.ob_type = &PyType_Type; PySocketSock_Type.tp_getattro = PyObject_GenericGetAttr; PySocketSock_Type.tp_alloc = PyType_GenericAlloc; - PySocketSock_Type.tp_free = _PyObject_Del; + PySocketSock_Type.tp_free = _PyMalloc_Del; m = Py_InitModule3(PySocket_MODULE_NAME, PySocket_methods, module_doc); Index: Objects/complexobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v retrieving revision 2.55 diff -u -r2.55 complexobject.c --- Objects/complexobject.c 22 Mar 2002 02:48:46 -0000 2.55 +++ Objects/complexobject.c 29 Mar 2002 21:00:00 -0000 @@ -199,11 +199,9 @@ { register PyComplexObject *op; - /* PyObject_New is inlined */ - op = (PyComplexObject *) PyObject_MALLOC(sizeof(PyComplexObject)); + op = PyMalloc_New(PyComplexObject, &PyComplex_Type); if (op == NULL) - return PyErr_NoMemory(); - PyObject_INIT(op, &PyComplex_Type); + return NULL; op->cval = cval; return (PyObject *) op; } @@ -992,7 +990,7 @@ 0, /* tp_init */ 0, /* tp_alloc */ complex_new, /* tp_new */ - _PyObject_Del, /* tp_free */ + _PyMalloc_Del, /* tp_free */ }; #endif Index: Objects/fileobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v retrieving revision 2.152 diff -u -r2.152 fileobject.c --- Objects/fileobject.c 23 Mar 2002 19:41:34 -0000 2.152 +++ Objects/fileobject.c 29 Mar 2002 21:00:01 -0000 @@ -1618,7 +1618,7 @@ (initproc)file_init, /* tp_init */ PyType_GenericAlloc, /* tp_alloc */ file_new, /* tp_new */ - _PyObject_Del, /* tp_free */ + _PyMalloc_Del, /* tp_free */ }; /* Interface for the 'soft space' between print items. */ Index: Objects/funcobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/funcobject.c,v retrieving revision 2.51 diff -u -r2.51 funcobject.c --- Objects/funcobject.c 18 Mar 2002 03:09:06 -0000 2.51 +++ Objects/funcobject.c 29 Mar 2002 21:00:01 -0000 @@ -554,7 +554,7 @@ cm_init, /* tp_init */ PyType_GenericAlloc, /* tp_alloc */ PyType_GenericNew, /* tp_new */ - _PyObject_Del, /* tp_free */ + _PyMalloc_Del, /* tp_free */ }; PyObject * @@ -683,7 +683,7 @@ sm_init, /* tp_init */ PyType_GenericAlloc, /* tp_alloc */ PyType_GenericNew, /* tp_new */ - _PyObject_Del, /* tp_free */ + _PyMalloc_Del, /* tp_free */ }; PyObject * Index: Objects/longobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v retrieving revision 1.115 diff -u -r1.115 longobject.c --- Objects/longobject.c 9 Mar 2002 12:02:59 -0000 1.115 +++ Objects/longobject.c 29 Mar 2002 21:00:02 -0000 @@ -48,7 +48,7 @@ PyLongObject * _PyLong_New(int size) { - return PyObject_NEW_VAR(PyLongObject, &PyLong_Type, size); + return PyMalloc_NewVar(PyLongObject, &PyLong_Type, size); } PyObject * @@ -2352,5 +2352,5 @@ 0, /* tp_init */ 0, /* tp_alloc */ long_new, /* tp_new */ - _PyObject_Del, /* tp_free */ + _PyMalloc_Del, /* tp_free */ }; Index: Objects/stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.152 diff -u -r2.152 stringobject.c --- Objects/stringobject.c 29 Mar 2002 03:29:07 -0000 2.152 +++ Objects/stringobject.c 29 Mar 2002 21:00:02 -0000 @@ -66,7 +66,7 @@ } #endif /* DONT_SHARE_SHORT_STRINGS */ - /* PyObject_NewVar is inlined */ + /* PyMalloc_NewVar is inlined */ op = (PyStringObject *) _PyMalloc_MALLOC(sizeof(PyStringObject) + size * sizeof(char)); if (op == NULL) @@ -125,7 +125,7 @@ } #endif /* DONT_SHARE_SHORT_STRINGS */ - /* PyObject_NewVar is inlined */ + /* PyMalloc_NewVar is inlined */ op = (PyStringObject *) _PyMalloc_MALLOC(sizeof(PyStringObject) + size * sizeof(char)); if (op == NULL) @@ -723,7 +723,7 @@ return (PyObject *)a; } size = a->ob_size + b->ob_size; - /* PyObject_NewVar is inlined */ + /* PyMalloc_NewVar is inlined */ op = (PyStringObject *) _PyMalloc_MALLOC(sizeof(PyStringObject) + size * sizeof(char)); if (op == NULL) Index: Objects/typeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v retrieving revision 2.131 diff -u -r2.131 typeobject.c --- Objects/typeobject.c 28 Mar 2002 05:33:33 -0000 2.131 +++ Objects/typeobject.c 29 Mar 2002 21:00:02 -0000 @@ -189,7 +189,7 @@ if (PyType_IS_GC(type)) obj = _PyObject_GC_Malloc(type, nitems); else - obj = PyObject_MALLOC(size); + obj = _PyMalloc_MALLOC(size); if (obj == NULL) return PyErr_NoMemory(); @@ -1103,7 +1103,7 @@ PyObject *doc = PyDict_GetItemString(dict, "__doc__"); if (doc != NULL && PyString_Check(doc)) { const size_t n = (size_t)PyString_GET_SIZE(doc); - type->tp_doc = (char *)PyObject_MALLOC(n+1); + type->tp_doc = (char *)PyMem_MALLOC(n+1); if (type->tp_doc == NULL) { Py_DECREF(type); return NULL; @@ -1189,7 +1189,7 @@ type->tp_clear = base->tp_clear; } else - type->tp_free = _PyObject_Del; + type->tp_free = _PyMalloc_FREE; /* Initialize the rest */ if (PyType_Ready(type) < 0) { @@ -1417,7 +1417,7 @@ CLEAR(et->slots); if (type->tp_doc != NULL) { - PyObject_FREE(type->tp_doc); + PyMem_FREE(type->tp_doc); type->tp_doc = NULL; } @@ -1688,7 +1688,7 @@ object_init, /* tp_init */ PyType_GenericAlloc, /* tp_alloc */ PyType_GenericNew, /* tp_new */ - _PyObject_Del, /* tp_free */ + _PyMalloc_Del, /* tp_free */ }; Index: Objects/xxobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/xxobject.c,v retrieving revision 2.19 diff -u -r2.19 xxobject.c --- Objects/xxobject.c 1 Sep 2000 23:29:27 -0000 2.19 +++ Objects/xxobject.c 29 Mar 2002 21:00:02 -0000 @@ -26,7 +26,7 @@ newxxobject(PyObject *arg) { xxobject *xp; - xp = PyObject_NEW(xxobject, &Xxtype); + xp = PyMalloc_New(xxobject, &Xxtype); if (xp == NULL) return NULL; xp->x_attr = NULL; @@ -39,7 +39,7 @@ xx_dealloc(xxobject *xp) { Py_XDECREF(xp->x_attr); - PyObject_DEL(xp); + PyMalloc_Del(xp); } static PyObject *