Re: [Tutor] exit handler for C extension module

2010-01-18 Thread Stefan Behnel
Shuying Wang, 18.01.2010 08:58: > I found what I was after, right after I posted to this list. It's > Py_AtExit. I'm accessing an old, unsupported database using it's C > API. I didn't write the respective code in Cython, but there's a comment next to it saying /* Don't use Py_AtExit because

Re: [Tutor] exit handler for C extension module

2010-01-18 Thread Shuying Wang
I found what I was after, right after I posted to this list. It's Py_AtExit. I'm accessing an old, unsupported database using it's C API. I've tried using Cython but found it hard to get my head around and I'm finding it somewhat easier to just write by hand. On Mon, Jan 18, 2010 at 6:40 PM, Stefa

Re: [Tutor] exit handler for C extension module

2010-01-17 Thread Stefan Behnel
Shuying Wang, 18.01.2010 03:13: > What would be an atexit equivalent for a C extension module? When my > extension module is unloaded, I would like some clean up functions to > be called from an external c library. I've had a look at the C > extension guide but I can't find anything like that, I'm

[Tutor] exit handler for C extension module

2010-01-17 Thread Shuying Wang
Hi, What would be an atexit equivalent for a C extension module? When my extension module is unloaded, I would like some clean up functions to be called from an external c library. I've had a look at the C extension guide but I can't find anything like that, Thanks in advance, .S