[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non-local exits are icky

>>>>> "Tom" == Tom Lord <lord@xxxxxxx> writes:

Tom> An FFI should be able to handle a situation where:

Tom> 	Scheme calls out to C, eventually to handle_event.

Tom>         handle_event calls to C, to my_hook_fn.

Tom>         my_hook_fn calls out to Scheme

Tom> Unless the GUI library I'm using has made it safe to longjmp past
Tom> handle_event, I can not implement this using the proposed FFI.  A
Tom> Scheme error underneat my_hook_fn will want to exit all the way past
Tom> handle_event.

This all hinges on your definition of "Scheme error."  The errors
signalled by the primitives in SRFI 50 all mean that there's a *bug*
in your program.  I'll admit that being able to "handle" this kind of
situation would be useful, but I don't even know what the right way to
do this would be in *Scheme*, much less in C.

Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla