Re: C API: Testing my reference counting

2006-03-22 Thread Tim Peters
[lord trousers] >>> Is there a way I can get hold of these kinds of statistics for >>> debugging? [Martin v. Löwis] >> This is best done when Python is build in debug mode. >> sys.gettotalrefcount then gives you the number of INCREF >> calls for which no DECREF has been made; you said that >> this

Re: C API: Testing my reference counting

2006-03-22 Thread lord trousers
Martin v. Löwis wrote: > lord trousers wrote: > > Is there a way I can get hold of these kinds of statistics for > > debugging? > > This is best done when Python is build in debug mode. > sys.gettotalrefcount then gives you the number of INCREF > calls for which no DECREF has been made; you said th

Re: C API: Testing my reference counting

2006-03-20 Thread Martin v. Löwis
lord trousers wrote: > Is there a way I can get hold of these kinds of statistics for > debugging? This is best done when Python is build in debug mode. sys.gettotalrefcount then gives you the number of INCREF calls for which no DECREF has been made; you said that this shouldn't change. If it doe

C API: Testing my reference counting

2006-03-19 Thread lord trousers
I'm currently replacing the Quake 3 game code (not the rendering, sound, or collision detection pieces) with Python. I've now successfully loaded Python modules and made callbacks to them, rendered maps, written some fly-through code, and embedded a Python interactive mode into the console (which i