unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* call-with-dynamic-root and longjump
@ 2004-07-07 11:29 Ondrej Zajicek
  0 siblings, 0 replies; only message in thread
From: Ondrej Zajicek @ 2004-07-07 11:29 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1117 bytes --]

Hello

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

I use something like:

SCM
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: santiago@mail.cz, jabber: santiago@njs.netlab.cz)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 140 bytes --]

_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-07 11:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-07 11:29 call-with-dynamic-root and longjump Ondrej Zajicek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).