[Top][All Lists]

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

call-with-dynamic-root and longjump

From: Ondrej Zajicek
Subject: call-with-dynamic-root and longjump
Date: Wed, 7 Jul 2004 13:29:05 +0200
User-agent: Mutt/1.5.6+20040523i


I want to use Guile for scripting in program we develop (Vrr - Vector gRaphic
editoR). It is written in C and use transaction-like system for handling
errors (implemented using setjmp and longjmp). To create working Guile
scripting in Vrr, i need good integration of Guile exceptions and Vrr

I use something like:

my_c_function_exported_as_scheme_subr (SCM args)
        setjmp ();
        if (first_time) scm_call_with_dynamic_root (thunk, handler)
        else some_else ();
        next_code (); 

Sometimes in thunk or handler may be called another subr which causes program
to longjump to setjmp and use else branch. And my question is whether is
correct to leave scm_call_with_dynamic_root (from thunk or handler) with
longjmp? Or are there any more issues with mixing guile code (exceptions ...)
with setjmp/longjmp?

Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: address@hidden, jabber: address@hidden)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3,
"To err is human -- to blame it on a computer is even more so."

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]