summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-04-18 00:45:59 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-04-18 00:45:59 (GMT)
commit21d7d4d5ca465e515e40157cfae707d1ec09bb76 (patch)
tree82265064e634cd19f2b697ce74bb1f8e2d41b7e1 /Objects/object.c
parentbbb931bebd9237183ee8bb0b5e90cf2ecb3fd046 (diff)
downloadcpython-21d7d4d5ca465e515e40157cfae707d1ec09bb76.zip
cpython-21d7d4d5ca465e515e40157cfae707d1ec09bb76.tar.gz
cpython-21d7d4d5ca465e515e40157cfae707d1ec09bb76.tar.bz2
_Py_PrintReferenceAddresses(): also print the type name. In real use
I'm finding some pretty baffling output, like reprs consisting entirely of three left parens. At least this will let us know what type the object is (it's not str -- there's no quote character in the repr). New tool combinerefs.py, to combine the two output blocks produced via PYTHONDUMPREFS.
Diffstat (limited to 'Objects/object.c')
-rw-r--r--Objects/object.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 49b9839..93057c0 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -2047,7 +2047,8 @@ _Py_PrintReferenceAddresses(FILE *fp)
PyObject *op;
fprintf(fp, "Remaining object addresses:\n");
for (op = refchain._ob_next; op != &refchain; op = op->_ob_next)
- fprintf(fp, "%p [%d]\n", op, op->ob_refcnt);
+ fprintf(fp, "%p [%d] %s\n", op, op->ob_refcnt,
+ op->ob_type->tp_name);
}
PyObject *