_PyObject_Dump(): print the type of the object. This is by far the
most frequently interesting information IMO. Also tidy up the output.
This commit is contained in:
parent
4441001b56
commit
5f5512d246
|
@ -194,9 +194,15 @@ void _PyObject_Dump(PyObject* op)
|
|||
if (op == NULL)
|
||||
fprintf(stderr, "NULL\n");
|
||||
else {
|
||||
fprintf(stderr, "object : ");
|
||||
(void)PyObject_Print(op, stderr, 0);
|
||||
fprintf(stderr, "\nrefcounts: %d\n", op->ob_refcnt);
|
||||
fprintf(stderr, "address : %p\n", op);
|
||||
fprintf(stderr, "\n"
|
||||
"type : %s\n"
|
||||
"refcount: %d\n"
|
||||
"address : %p\n",
|
||||
op->ob_type==NULL ? "NULL" : op->ob_type->tp_name,
|
||||
op->ob_refcnt,
|
||||
op);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue