unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Cedric Cellier <rixed@happyleptic.org>
Cc: guile-user@gnu.org
Subject: Re: scm_with_continuation_barrier returning #f on throws ?
Date: Sat, 25 Sep 2010 16:36:19 +0200	[thread overview]
Message-ID: <m3iq1topp8.fsf@unquote.localdomain> (raw)
In-Reply-To: <20100906112007.GA21079@securactive.net> (Cedric Cellier's message of "Mon, 6 Sep 2010 13:20:07 +0200")

Hi Cedric,

On Mon 06 Sep 2010 13:20, Cedric Cellier <rixed@happyleptic.org> writes:

> SCM res = scm_with_guile(load_file, "a_file_that_doesnt_exist");

This statement is ill-formed, because you shouldn't have references to
SCM objects outside of Guile. This is indicated by scm_with_guile's
return value, which is void* and not SCM.

The docs about scm_with_continuation_barrier are correct; it does indeed
return #f on a throw. But scm_with_guile uses
scm_c_with_continuation_barrier, which is different, because it returns
a C value, a void*. The error case there has it return NULL.

Regards,

Andy
-- 
http://wingolog.org/



  reply	other threads:[~2010-09-25 14:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-06 11:20 scm_with_continuation_barrier returning #f on throws ? Cedric Cellier
2010-09-25 14:36 ` Andy Wingo [this message]
2010-09-26  5:30   ` rixed

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=m3iq1topp8.fsf@unquote.localdomain \
    --to=wingo@pobox.com \
    --cc=guile-user@gnu.org \
    --cc=rixed@happyleptic.org \
    /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).