Mercurial > cpython-lru_cache-weakref
diff Objects/object.c @ 16167:71ceaba3f615 legacy-trunk
PyObject_Dump(): Use %p format to print the address of the pointer.
PyGC_Dump(): Wrap this in a #ifdef WITH_CYCLE_GC.
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Tue, 23 Jan 2001 16:33:18 +0000 |
| parents | 0a72070eab6e |
| children | 1bb7651683e7 |
line wrap: on
line diff
--- a/Objects/object.c Tue Jan 23 16:25:19 2001 +0000 +++ b/Objects/object.c Tue Jan 23 16:33:18 2001 +0000 @@ -225,13 +225,15 @@ { (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)
