This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Name change: SCMWORD --> scm_word_t
- To: Mikael Djurfeldt <djurfeldt at nada dot kth dot se>
- Subject: Re: Name change: SCMWORD --> scm_word_t
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 12 Mar 2000 17:34:09 +0100
- Cc: mjs at eazel dot com, gjb at cs dot washington dot edu, guile at sourceware dot cygnus dot com
- Cc: djurfeldt at nada dot kth dot se
- References: <E12Tvin-0005Og-00@mdj.nada.kth.se> <xy7r9dg9mvi.fsf@mdj.nada.kth.se>
Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
> OK, how about "bits": We use the macro whenever we want access to the
> bits of an SCM value:
>
> SCM_BITS (x)
> SCM_CARBITS (x)
> SCM_SCM (x)
>
> as a subsitute for the current
>
> SCM_ASWORD (x)
> SCM_CARW (x)
> SCM_ASSCM (x)
>
> ?
You might argue that "word" is better because the basic use really do
denote the size of data: Lisp cells are made up from words.
But while this may be a basic use, it is not the typical use.
Here's the typical use:
switch (field_type)
{
case 'u':
answer = scm_ulong2num (SCM_ASWORD (data[p]));
break;
and I think
switch (field_type)
{
case 'u':
answer = scm_ulong2num (SCM_BITS (data[p]));
break;
looks better.