unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Ondrej Zajicek <santiago@mail.cz>
Subject: call-with-dynamic-root and longjump
Date: Wed, 7 Jul 2004 13:29:05 +0200	[thread overview]
Message-ID: <20040707112905.GA20630@feanor> (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

                 reply	other threads:[~2004-07-07 11:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040707112905.GA20630@feanor \
    --to=santiago@mail.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).