This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: eval.c
- To: Dirk Herrmann <dirk at ida dot ing dot tu-bs dot de>
- Subject: Re: eval.c
- From: Jost Boekemeier <jostobfe at linux dot zrz dot TU-Berlin dot DE>
- Date: 19 Apr 2000 20:52:10 +0200
- Cc: Guile Mailing List <guile at sourceware dot cygnus dot com>
- References: <Pine.LNX.4.21.0004182320480.16813-100000@marvin.ida.ing.tu-bs.de>
Dirk Herrmann <dirk@ida.ing.tu-bs.de> writes:
> as pointer to a single SCM value.
No. It's not only a SCM value but a pointer to a concrete vcell.
(a . 12) for example or (a . UNDEFINED) which means that this cell is
undefined. The current module system (see `sym2vcell') returns the
value UNDEFINED iff the cell doesn't exist at all, in which case the
lookup method must return a pointer to undef_cell.
So at the moment UNDEFINED and undef_cell are two different
things.
> Thus, I am going to replace the definition by:
> static SCM undef_object = SCM_UNDEFINED;
> and to replace the code in scm_lookupcar by:
> return &undef_object;
> and everything is fine and a little bit clearer.
In this case you can nuke `undef_object' completely and return a
pointer to the variable that holds the return value of sym2vcell().
But if you do this, you must insert additional SCM_NIMP() checks
before checking the cdr of the vcell against SCM_UNDEFINED (maybe the
new code does this automatically, I don't know).
Jost