Compiling v1.3 with reference count debug
I've written an extension module to Python, but somewhere theres a DECREF
that there shouldnt be.. (Probably on an error condition or something...)
Consequently after calling this function about 2000 times (or so) python
SEGVs (not in my code), while decref'ing either a list or a dictionary
(both of which I use in my code).
I know Python can be compiled with extra bits to aid in reference count
debugging, (by adding -DDEBUG to the compile line), but the program wont
link. ld comes back with three undefined symbols (Py_NewReference,
Py_Dealloc, and Py_ForgetReference).... (which are actually #defined in
object.h, but dont seem to be if DEBUG is defined).
So, what I was wondering is:
1) Is there a nice addition to Python that I can compile in to debug all my
reference counting....
or
2) Do I need to set some other flag as well to get Python to compile with
-DDEBUG
or
3) Is there a nice easy way to debug this stuff.....
Unfortunately as the module is rather complicated and integrates with
ESQL/C etc etc the code is not that simple!!!!
Thanks for any help!!!
James