diff options
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 14 |
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 |