]> granicus.if.org Git - python/commit
A few miscellaneous helpers.
authorBarry Warsaw <barry@python.org>
Tue, 23 Jan 2001 16:24:35 +0000 (16:24 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 23 Jan 2001 16:24:35 +0000 (16:24 +0000)
commit9bf16440f4e50efc28212e46d265cf1351cbdcc1
tree4ed3425bf1cb11d8e789a3f1143382081eb97496
parent9667ed23c5f78be235522a1d5f39306bcb72f650
A few miscellaneous helpers.

PyObject_Dump(): New function that is useful when debugging Python's C
runtime.  In something like gdb it can be a pain to get some useful
information out of PyObject*'s.  This function prints the str() of the
object to stderr, along with the object's refcount and hex address.

PyGC_Dump(): Similar to PyObject_Dump() but knows how to cast from the
garbage collector prefix back to the PyObject* structure.

[See Misc/gdbinit for some useful gdb hooks]

none_dealloc(): Rather than SEGV if we accidentally decref None out of
existance, we assign None's and NotImplemented's destructor slot to
this function, which just calls abort().
Objects/object.c