Tim Harig <user...@ilthio.net> writes:
>> longjmp.  Alternatively you can have an auxiliary stack of cleanup
>> records that the longjmp handler walks through.  Of course if you do
>
> Only if you already have pointers to *all* of the data structures at
> the point where you put your setjmp().

The setjmp point only has to know where the aux stack is and its depth
when the longjmp happens.  The cleanup records contain any necessary
pointers to data structures that need freeing.  That is basically how
try/finally would do it too.  This is pretty standard stuff.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to