I happen to have the code for the C library in question, but I don't think this is the way to go in general. If there's a way to get Python to give memory back to the C allocator I can avoid touching the library at all.
Regards, Iker John Machin wrote: > [EMAIL PROTECTED] wrote: > > I can, but the extension is only a thin wrapper around a general > > purpose C library which is also used independently of Python. > > > > So change the library to use xmalloc etc and add something like this to > the .h file: > > #ifdef PYMEM > #define xmalloc PyMem_Malloc > etc > #else > #define xmalloc malloc > etc > #endif -- http://mail.python.org/mailman/listinfo/python-list