This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: eval.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]