On Sep 1, 2009, at 02:23, Ken Raeburn wrote:
I can clean some of this up trivially -- SCM_PACK/SCM_UNPACK as
needed, change == to scm_is_eq. The initializers make it slightly
less trivial, and I can imagine different courses of action.
Okay, not quite so trivial as I blithely asserted.
It looks like the eval code is going to be annoying too -- lots of
case labels that are constructed by making SCM values and then
extracting bits from them with ISYMNUM, which won't work with a
union. I'm thinking, maybe an enum or list of macros to define the
basic set of integers, and then apply SCM_MAKISYM to the enumerator
values, and then we can refer to the values symbolically without
extracting bits out of constructed SCM values?
The smob creation macros play fast and loose with types, and accept
anything that can be cast to scm_t_bits... which doesn't include union
types like SCM in this mode; extracting values is similarly messy.
I'm not sure that can be cleaned up without changing the API.
There are also bits that I suspect won't build cleanly if SCM is an
integer (STRICTNESS=0), too.
Ken