Hi again, I've got the following problem:There is client code of my application that is already written and cotains so lines of code like these ones:
void foo(int c) {
if (c < 5) {
gui_exit(1)
}
// do some other things that fail if c is < 5
}
I am the one who has to implement gui_exit, which was originally a
wrapper for the normal C exit function doing some clean up.
My first attempt to implement gui_exit in cython was using sys.exit. The problem with this approach is that sys.exit depends on exceptions, which are only checked after the client routine is completely processed. So foo does not exit at gui_exit and possibly generates a segmentation fault in the other things it does.
Is there a solution for this problem, that uses the python exit mechanism? I need that to clean up resources.
Thanks for the help Johannes
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
