From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ondrej Zajicek Newsgroups: gmane.lisp.guile.user Subject: call-with-dynamic-root and longjump Date: Wed, 7 Jul 2004 13:29:05 +0200 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <20040707112905.GA20630@feanor> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1117312794==" X-Trace: sea.gmane.org 1089199443 3374 80.91.224.253 (7 Jul 2004 11:24:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Jul 2004 11:24:03 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Jul 07 13:23:47 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BiAWh-00007G-00 for ; Wed, 07 Jul 2004 13:23:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BiAYk-0005FF-Oo for guile-user@m.gmane.org; Wed, 07 Jul 2004 07:25:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BiAYe-0005DJ-WC for guile-user@gnu.org; Wed, 07 Jul 2004 07:25:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BiAYd-0005Bu-Jz for guile-user@gnu.org; Wed, 07 Jul 2004 07:25:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BiAYd-0005Bn-Hg for guile-user@gnu.org; Wed, 07 Jul 2004 07:25:47 -0400 Original-Received: from [194.108.73.1] (helo=ns3.coprosys.cz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BiAW6-0004ax-Vc for guile-user@gnu.org; Wed, 07 Jul 2004 07:23:11 -0400 Original-Received: from feanor.alias.chrudimsko.czf (snajdrvint.cps.cz [213.151.91.68]) by ns3.coprosys.cz (8.12.8/8.12.9) with ESMTP id i67BN1U0017423 for ; Wed, 7 Jul 2004 13:23:02 +0200 Original-Received: from santiago by feanor.alias.chrudimsko.czf with local (Exim 3.36 #1 (Debian)) id 1BiAbp-0005OQ-00 for ; Wed, 07 Jul 2004 13:29:05 +0200 Original-To: guile-user@gnu.org X-Operating-System: Debian GNU/Linux unstable User-Agent: Mutt/1.5.6+20040523i X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-MailScanner-SpamCheck: neni spam, SpamAssassin (skore=-10.4, vyzaduje 8, BAYES_01 -5.40, PGP_SIGNATURE_2 -2.21, USER_AGENT_MUTT -2.80) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:3315 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:3315 --===============1117312794== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello I want to use Guile for scripting in program we develop (Vrr - Vector gRaph= ic 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.=20 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 (); =09 next_code ();=20 } Sometimes in thunk or handler may be called another subr which causes progr= am 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 ..= =2E) with setjmp/longjmp? --=20 Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@mail.cz, jabber: santiago@njs.ne= tlab.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." --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iEYEARECAAYFAkDr3oEACgkQw1GB2RHercPh+ACfYRVceFs+P+4uC6JqnUTtIKdx 3FkAn2V3ZK58iG+ZRJ1MWyW2O/rloM3+ =vo+3 -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0-- --===============1117312794== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user --===============1117312794==--