[Pyrex] Python Strings and PyMem_Malloc/Free

Grant McDonald gmcdonald at infocomp.com
Mon Jul 4 05:55:33 CEST 2005


Hi,

It turned out that the problem was related to the TrkGetNoteData call. Even
though the documentation made no mention of it the buffer size argument is
designed to be minus the space for the null terminator! If i rewrite my code
to take this into account i don't get the problem any more.

Lenard, i like the suggestion of the try: finally: block as it certainly
neatens up the code. The only issue i have is that it makes it impossible to
release the GIL within the try block (if my understanding is correct).

Regards,

Grant M.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.copyleft.no/pipermail/pyrex/attachments/20050704/b40f6b6a/attachment.html


More information about the Pyrex mailing list