guile-devel
[Top][All Lists]
Advanced

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

Re: The relationship between SCM and scm_t_bits.


From: Paul Jarc
Subject: Re: The relationship between SCM and scm_t_bits.
Date: Fri, 21 May 2004 16:30:01 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)

Dirk Herrmann <address@hidden> wrote:
> As long as it is just a cell, we check the bits. Only if we know its
> a pair, we dare to access it as a pair of SCM values.

But according to the C standard, we shouldn't dare to access it as
scm_t_bits either.  unsigned char is the only universally safe
aliasing access type.

If it wouldn't be too much trouble to access the type bits through
unsigned char, then we could store SCM values on the heap and work
with pointers to SCM (even if only for reading, not writing).  We
would use the type bits to decide whether to access a given word/cell
as SCM or scm_t_bits.  (It'd be nice for smobs if void* could be
another option there.)  That would conform to the C standard.


paul




reply via email to

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