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: struct interface


Dirk Herrmann <dirk@ida.ing.tu-bs.de> writes:

> What about putting all of these on a common base:
> 
> SCM_MEMORY_WORD(p, n)          --> (((scm_bits_t *) p) [n])
> SCM_MEMORY_OBJECT(p, n)        --> (SCM_PACK (((scm_bits_t *) p) [n]))
> SCM_SET_MEMORY_WORD(p, n, v)   --> (((scm_bits_t *) p) [n] = (v))
> SCM_SET_MEMORY_OBJECT(p, n, v) --> (((scm_bits_t *) p) [n] = SCM_UNPACK (v))

Regarding structs: As I've said earlier, structs will be replaced, so
it's probably waste of time change them.

Regarding your suggestion above: When we design the new record
representation, the "layouts" of objects should probably allow for SCM
values to be located non-word aligned within the object.  This implies
that the index should be of unit `char' rather than `scm_bits_t *',
but maybe we should have a separate set of macros for this kind of
access.

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