From: Barry Warsaw Date: Tue, 23 Jan 2001 16:33:18 +0000 (+0000) Subject: PyObject_Dump(): Use %p format to print the address of the pointer. X-Git-Tag: v2.1a2~269 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=903138f7758d4a4abf5a11a0686379ff6a136570;p=thirdparty%2FPython%2Fcpython.git PyObject_Dump(): Use %p format to print the address of the pointer. PyGC_Dump(): Wrap this in a #ifdef WITH_CYCLE_GC. --- diff --git a/Objects/object.c b/Objects/object.c index 8a493531d0d3..b613dba29faf 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -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)