guile-user
[Top][All Lists]
Advanced

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

Re: converting from the numeric tower to C99 integer types.


From: Rob Browning
Subject: Re: converting from the numeric tower to C99 integer types.
Date: Tue, 15 Apr 2003 12:41:56 -0500
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

Thamer Al-Harbash <address@hidden> writes:

> I understand guile currently does not support this based on
> looking at the code (libguile/numbers.c) and the documentation;
> however, has anyone here written patches to convert SCM integers
> to C99 types: scm_num2int32(), scm_num2uint8() ?

We've recently added support in the development tree for a new set of
guaranteed and optional types that match these, and they're are all
public definitions.  We haven't yet added num2foo and foo2num support
for them, but that would probably make sense.

  From NEWS:

    ** Guile now publically defines some basic type infrastructure.

    Guile always defines

      SCM_SIZEOF_CHAR
      SCM_SIZEOF_UNSIGNED_CHAR
      SCM_SIZEOF_SHORT
      SCM_SIZEOF_UNSIGNED_SHORT
      SCM_SIZEOF_LONG
      SCM_SIZEOF_UNSIGNED_LONG
      SCM_SIZEOF_INT
      SCM_SIZEOF_UNSIGNED_INT
      SCM_SIZEOF_LONG_LONG /* defined to 0 if type not available */
      SCM_SIZEOF_UNSIGNED_LONG_LONG /* defined to 0 if type not available */

      scm_t_int8
      scm_t_uint8
      scm_t_int16
      scm_t_uint16
      scm_t_int32
      scm_t_uint32

    Guile always defines to 0 or 1

      SCM_HAVE_T_INT64
      SCM_HAVE_T_UINT64

    and when either of these are defined to 1, also defines 

      scm_t_int64
      scm_t_uint64

    respectively.

    Guile always defines

      scm_t_timespec

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4




reply via email to

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