guile-devel
[Top][All Lists]
Advanced

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

Re: scm_bits_t / scm_ubits_t


From: Dirk Herrmann
Subject: Re: scm_bits_t / scm_ubits_t
Date: Thu, 14 Jun 2001 17:56:17 +0200 (MEST)

On 14 Jun 2001, Marius Vollmer wrote:

> Marius Vollmer <address@hidden> writes:
> 
> > and make scm_t_bits an unsigned type.
> 
> Err, what was the reason again for making scm_t_bits unsigned?

The reason is, that it is basically a raw bit structure, which does not
have any sign information.  Signedness is an issue that only comes up
_after_ the type information has been extracted.

> I just realized that we need a signed version anyway for fixnum
> fiddling.

I think the point is different:  If a SCM appears to be a fixnum, the raw
bit structure has to be converted into a signed integral value.  The type
scm_t_bits itself should not be signed or unsigned.  It is all a matter of
clean type conversions.  In our case, the macros SCM_INUM and SCM_MAKINUM
would do the casting.

Best regards,
Dirk Herrmann




reply via email to

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