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: Name change: SCMWORD --> scm_word_t


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.

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