summaryrefslogtreecommitdiff
path: root/Include/object.h
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-04-17 19:52:29 +0000
committerTim Peters <tim.peters@gmail.com>2003-04-17 19:52:29 +0000
commitaf4b7af418f1b591879ce39fd30ebbde37729e03 (patch)
tree17c25cd00488a9ace78f7bfbf00fc19550ca374a /Include/object.h
parent8918456ec400a2ea60452ae49c780f496207143d (diff)
downloadcpython-af4b7af418f1b591879ce39fd30ebbde37729e03.tar.gz
_Py_PrintReferences(): Changed to print object address at start of each
new line. New pvt API function _Py_PrintReferenceAddresses(): Prints only the addresses and refcnts of the live objects. This is always safe to call, because it has no dependence on Python's C API. Py_Finalize(): If envar PYTHONDUMPREFS is set, call (the new) _Py_PrintReferenceAddresses() right before dumping final pymalloc stats. We can't print the reprs of the objects here because too much of the interpreter has been shut down. You need to correlate the addresses displayed here with the object reprs printed by the earlier PYTHONDUMPREFS call to _Py_PrintReferences().
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/object.h b/Include/object.h
index 3ac75380a2..3c7264f797 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -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_PrintReferenceAddresses(FILE *);
PyAPI_FUNC(void) _Py_AddToAllObjects(PyObject *, int force);
#else