summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2010-12-03 20:14:31 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2010-12-03 20:14:31 (GMT)
commit4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9 (patch)
treec8f1fef715f8d158e58f17cab14af65455de1d77 /Objects/object.c
parentc4df7845143f9afe0d20f4421a41904f3cbb991a (diff)
downloadcpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.zip
cpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.tar.gz
cpython-4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9.tar.bz2
Merge branches/pep-0384.
Diffstat (limited to 'Objects/object.c')
-rw-r--r--Objects/object.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 082dd78..17e5069 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -1755,7 +1755,6 @@ _Py_GetObjects(PyObject *self, PyObject *args)
#endif
-
/* Hack to force loading of pycapsule.o */
PyTypeObject *_PyCapsule_hack = &PyCapsule_Type;
@@ -1900,6 +1899,19 @@ _PyTrash_destroy_chain(void)
}
}
+#ifndef Py_TRACE_REFS
+/* For Py_LIMITED_API, we need an out-of-line version of _Py_Dealloc.
+ Define this here, so we can undefine the macro. */
+#undef _Py_Dealloc
+PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
+void
+_Py_Dealloc(PyObject *op)
+{
+ _Py_INC_TPFREES(op) _Py_COUNT_ALLOCS_COMMA
+ (*Py_TYPE(op)->tp_dealloc)(op);
+}
+#endif
+
#ifdef __cplusplus
}
#endif