Thanks for this, I see there is also scm_is_true to take care of the
possibility that SCM_BOOL_T might not be a scalar type, we should be
using that too.

Richard

On Wed, 2011-08-24 at 12:01 -0400, [email protected] wrote:
> 
> Richard Shann <[email protected]> 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 


Reply via email to