summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2002-04-12 03:06:53 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2002-04-12 03:06:53 (GMT)
commit09a2ae58824d80ef69d4a2774d61bd6bd6da224e (patch)
treeb6608049d836213db31e70f8ec987ea27e5882d7 /Objects
parent626d774df6752f3f8b12c99567d70c5539b2949b (diff)
downloadcpython-09a2ae58824d80ef69d4a2774d61bd6bd6da224e.zip
cpython-09a2ae58824d80ef69d4a2774d61bd6bd6da224e.tar.gz
cpython-09a2ae58824d80ef69d4a2774d61bd6bd6da224e.tar.bz2
Change signature of _PyObject_GC_Malloc to match PyObject_MALLOC.
PyObject_Del and PyObject_GC_Del can now be used as a function designators.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index fff95b4..d290278 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -190,7 +190,7 @@ PyType_GenericAlloc(PyTypeObject *type, int nitems)
const size_t size = _PyObject_VAR_SIZE(type, nitems);
if (PyType_IS_GC(type))
- obj = _PyObject_GC_Malloc(type, nitems);
+ obj = _PyObject_GC_Malloc(size);
else
obj = PyObject_MALLOC(size);
@@ -1187,12 +1187,12 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
/* Always override allocation strategy to use regular heap */
type->tp_alloc = PyType_GenericAlloc;
if (type->tp_flags & Py_TPFLAGS_HAVE_GC) {
- type->tp_free = _PyObject_GC_Del;
+ type->tp_free = PyObject_GC_Del;
type->tp_traverse = subtype_traverse;
type->tp_clear = base->tp_clear;
}
else
- type->tp_free = _PyObject_Del;
+ type->tp_free = PyObject_Del;
/* Initialize the rest */
if (PyType_Ready(type) < 0) {
@@ -1494,7 +1494,7 @@ PyTypeObject PyType_Type = {
0, /* tp_init */
0, /* tp_alloc */
type_new, /* tp_new */
- _PyObject_GC_Del, /* tp_free */
+ PyObject_GC_Del, /* tp_free */
(inquiry)type_is_gc, /* tp_is_gc */
};
@@ -1709,7 +1709,7 @@ PyTypeObject PyBaseObject_Type = {
object_init, /* tp_init */
PyType_GenericAlloc, /* tp_alloc */
PyType_GenericNew, /* tp_new */
- _PyObject_Del, /* tp_free */
+ PyObject_Del, /* tp_free */
};
@@ -4272,5 +4272,5 @@ PyTypeObject PySuper_Type = {
super_init, /* tp_init */
PyType_GenericAlloc, /* tp_alloc */
PyType_GenericNew, /* tp_new */
- _PyObject_GC_Del, /* tp_free */
+ PyObject_GC_Del, /* tp_free */
};