PyObject_Dump(): Use %p format to print the address of the pointer.

PyGC_Dump(): Wrap this in a #ifdef WITH_CYCLE_GC.
This commit is contained in:
Barry Warsaw 2001-01-23 16:33:18 +00:00
parent 39e44d7a9c
commit 903138f775
1 changed files with 4 additions and 2 deletions

View File

@ -225,13 +225,15 @@ void PyObject_Dump(PyObject* op)
{
(void)PyObject_Print(op, stderr, 0);
fprintf(stderr, "\nrefcounts: %d\n", op->ob_refcnt);
fprintf(stderr, "address : %x\n", op);
fprintf(stderr, "address : %p\n", op);
}
#ifdef WITH_CYCLE_GC
void PyGC_Dump(PyGC_Head* op)
{
PyObject_Dump(PyObject_FROM_GC(op));
}
#endif /* WITH_CYCLE_GC */
PyObject *
PyObject_Repr(PyObject *v)