[Pyrex] Python Strings and PyMem_Malloc/Free

len-l at telus.net len-l at telus.net
Tue Jul 5 20:50:38 CEST 2005


On 4 Jul 2005 at 13:55, Grant McDonald wrote:

> 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).

The GIL can be released within a try block if it is also reacquired within the block. 
By the time a finally clause is executed the Python API may have been called.

Lenard Lindstrom
<len-l at telus.net>




More information about the Pyrex mailing list