diff options
author | Barry Warsaw <barry@python.org> | 2001-01-23 16:33:18 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2001-01-23 16:33:18 (GMT) |
commit | 903138f7758d4a4abf5a11a0686379ff6a136570 (patch) | |
tree | abb088e612038f67f85c403c38272b622683c2b4 | |
parent | 39e44d7a9c7fea5e6e8f343082f8f28c4576d5e4 (diff) | |
download | cpython-903138f7758d4a4abf5a11a0686379ff6a136570.zip cpython-903138f7758d4a4abf5a11a0686379ff6a136570.tar.gz cpython-903138f7758d4a4abf5a11a0686379ff6a136570.tar.bz2 |
PyObject_Dump(): Use %p format to print the address of the pointer.
PyGC_Dump(): Wrap this in a #ifdef WITH_CYCLE_GC.
-rw-r--r-- | Objects/object.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Objects/object.c b/Objects/object.c index 8a49353..b613dba 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) |