guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GRM questions


From: Dirk Herrmann
Subject: Re: GRM questions
Date: Wed, 20 Jun 2001 23:15:06 +0200 (MEST)

On 2 Jun 2001, Marius Vollmer wrote:

> Dirk Herrmann <address@hidden> writes:
> 
> > * We could introduce macros SCM_SMOB_DATA_[0-3], maybe even
> >   SCM_SMOB_[WORD|OBJECT]_data_[0-4], with SCM_SMOB_OBJECT_DATA_0 being an
> >   illegal combination.
> 
> I prefer this.  Do we need "DATA" in the names?  What about treating
> the 16 bit field specifically with SCM_SMOB_SCRAP or so that hides the
> exact place that field takes in the word.  Also, there should probably
> be constructors that allow this field to be specified.

OK, so we should probably use the following set of names:

SCM_SMOB_WORD_[1-3]
SCM_SMOB_OBJECT_[1-3]

However, I am not sure about the SCM_SMOB_SCRAP suggestion.  
Alternatively, one could simply use SCM_SMOB_WORD_0 and have that macro
mask out the relevant bits.  On the other hand, whoever works with smobs
must have at least a basic understanding of guile's type system anyway.  
Thus, the restriction to only use the upper bits of the smob does not seem
too important.  In this case, a macro SCM_SMOB_WORD_0 should also be
introduced, but it wouldn't need to do any bit magic.

Best regards,
Dirk Herrmann




reply via email to

[Prev in Thread] Current Thread [Next in Thread]