This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: eval.c
- To: Jost Boekemeier <jostobfe at calvados dot zrz dot TU-Berlin dot DE>
- Subject: Re: eval.c
- From: Dirk Herrmann <dirk at ida dot ing dot tu-bs dot de>
- Date: Tue, 18 Apr 2000 23:31:01 +0200 (MEST)
- cc: Guile Mailing List <guile at sourceware dot cygnus dot com>
On 18 Apr 2000, Jost Boekemeier wrote:
> Dirk Herrmann <dirk@ida.ing.tu-bs.de> writes:
>
> > > > static scm_cell undef_cell = { SCM_UNDEFINED, SCM_UNDEFINED };
> > Every cell that you get via SCM_NEWCELL is guaranteed to be on a 8 byte
> > boundary.
>
> Umm, `undef_cell' was not returned by SCM_NEWCELL. Maybe it is better
> to rename `undef_cell' to `undef_cell_tag' to avoid confusion.
I have checked that not only in the macro expander, but in all places
where a result from scm_lookupcar is used, this result is always only used
as pointer to a single SCM value. Thus, my first suspicion, that there
was some weird things were going on with pointer arithmetics somewhere,
was wrong: It is actually totally unimportant whether there is a cell or
not. scm_lookupcar returns a pointer to a single SCM value, and everybody
uses this as a pointer to a single SCM value.
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.
Best regards and thanks for your help.
Dirk