Mercurial > cpython-lru_cache-weakref
diff Objects/object.c @ 28669:0d8d4c8dc68b legacy-trunk
_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.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Fri, 18 Apr 2003 00:45:59 +0000 |
| parents | 56006d97bcef |
| children | 941d49a65f06 |
line wrap: on
line diff
--- a/Objects/object.c Fri Apr 18 00:13:53 2003 +0000 +++ b/Objects/object.c Fri Apr 18 00:45:59 2003 +0000 @@ -2047,7 +2047,8 @@ 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 *
