unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Andreas Rottmann <a.rottmann@gmx.at>
To: richard.shann@virgin.net
Cc: guile-user@gnu.org, rm@tuxteam.de
Subject: Re: scm_defined_p(sym, env)
Date: Tue, 23 Aug 2011 21:07:28 +0200	[thread overview]
Message-ID: <87bovgaqvj.fsf@rotty.yi.org> (raw)
In-Reply-To: <1314105991.2188.4.camel@debian2.myhost> (Richard Shann's message of "Tue, 23 Aug 2011 14:26:31 +0100")

Richard Shann <richard.shann@virgin.net> writes:

> I didn't find the SCM_UNBNDP() that you mention but since mailing the
> list I stumbled on SCM_UNDEFINED and tried 
> if(opt==SCM_UNDEFINED) ...
> and that seems to work. 
>
IIRC, that this works is not actually guaranteed (it depends on the type
of the SCM values; that type might not have defined/reasonable behavior
wrt. the "==" operator, so the right way to write the above comparison
would be `scm_is_eq(opt, SCM_UNDEFINED)', and incidentially, this is how
SCM_UNBNDP() is defined (see libguile/tags.h, at least on Guile 2.0).

> So (unless I am doing something bad) I think I am back on course -
> thanks!
>
The idiom you used may work for you now, but may be broken at any time,
or even when compiling Guile with a different configuration (search for
SCM_DEBUG_TYPING_STRICTNESS in libguile/tags.h for illustration).

HTH, Rotty

PS: Please consider avoiding top-posts (see for instance
<http://www.usenet-replayer.com/faq/alt.games.generals.html> for a
rationale).
-- 
Andreas Rottmann -- <http://rotty.yi.org/>



  reply	other threads:[~2011-08-23 19:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-23 11:36 scm_defined_p(sym, env) Richard Shann
2011-08-23 11:54 ` rm
2011-08-23 13:26   ` Richard Shann
2011-08-23 19:07     ` Andreas Rottmann [this message]
2011-08-29 11:30 ` rixed
     [not found] <mailman.191.1314201660.28460.guile-user@gnu.org>
2011-08-24 20:25 ` Richard Shann

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=87bovgaqvj.fsf@rotty.yi.org \
    --to=a.rottmann@gmx.at \
    --cc=guile-user@gnu.org \
    --cc=richard.shann@virgin.net \
    --cc=rm@tuxteam.de \
    /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).