]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
PyObject_Dump(): Use %p format to print the address of the pointer.
authorBarry Warsaw <barry@python.org>
Tue, 23 Jan 2001 16:33:18 +0000 (16:33 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 23 Jan 2001 16:33:18 +0000 (16:33 +0000)
PyGC_Dump(): Wrap this in a #ifdef WITH_CYCLE_GC.

Objects/object.c

index 8a493531d0d33545c0f9e38847af7d8b55354a0b..b613dba29fafc92486eef16ac7ccdb1b0014980a 100644 (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)