This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: struct interface
>>>>> "Mikael" == Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
Mikael> 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))
Mikael> Regarding structs: As I've said earlier, structs will be
Mikael> replaced, so it's probably waste of time change them.
How soon? This sounds suspiciously like the module system which has
been "going to change" since the latter half of the 20th century. :)
Mikael> Regarding your suggestion above: When we design the new
Mikael> record representation, the "layouts" of objects should
Mikael> probably allow for SCM values to be located non-word
Mikael> aligned within the object.
Why? I don't see the utility and it will increase the complexity of
the access macros since misaligned SCM values can't be accessed
directly on some architectures.
Cheers,
Clark