Refactored some of the Py_TRACE_REFS code. New private API function

_Py_AddToAllObjects() that simply inserts an object at the front of
the doubly-linked list of all objects.  Changed PyType_Ready() (the
 closest thing we've got to a choke point for type objects) to call
that.
This commit is contained in:
Tim Peters 2003-03-23 03:33:13 +00:00
parent 3e40c7ff5b
commit 36eb4dfb81
3 changed files with 27 additions and 10 deletions

View file

@ -582,6 +582,7 @@ PyAPI_FUNC(void) _Py_NewReference(PyObject *);
PyAPI_FUNC(void) _Py_ForgetReference(PyObject *);
PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
PyAPI_FUNC(void) _Py_PrintReferences(FILE *);
PyAPI_FUNC(void) _Py_AddToAllObjects(PyObject *);
#else
/* Without Py_TRACE_REFS, there's little enough to do that we expand code