2 @c This is part of the GNU Guile Reference Manual.
3 @c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004
4 @c Free Software Foundation, Inc.
5 @c See the file guile.texi for copying conditions.
11 Guile represents all Scheme values with the single C type @code{SCM}.
12 For an introduction to this topic, @xref{Dynamic Types}.
15 @code{SCM} is the user level abstract C type that is used to represent
16 all of Guile's Scheme objects, no matter what the Scheme object type is.
17 No C operation except assignment is guaranteed to work with variables of
18 type @code{SCM}, so you should only use macros and functions to work
19 with @code{SCM} values. Values are converted between C data types and
20 the @code{SCM} type with utility functions and macros.
24 @deftp {C Type} scm_t_bits
25 @code{scm_t_bits} is an unsigned integral data type that is guaranteed
26 to be large enough to hold all information that is required to
27 represent any Scheme object. While this data type is mostly used to
28 implement Guile's internals, the use of this type is also necessary to
29 write certain kinds of extensions to Guile.
32 @deftp {C Type} scm_t_signed_bits
33 This is a signed integral type of the same size as @code{scm_t_bits}.
36 @deftypefn {C Macro} scm_t_bits SCM_UNPACK (SCM @var{x})
37 Transforms the @code{SCM} value @var{x} into its representation as an
38 integral type. Only after applying @code{SCM_UNPACK} it is possible to
39 access the bits and contents of the @code{SCM} value.
42 @deftypefn {C Macro} SCM SCM_PACK (scm_t_bits @var{x})
43 Takes a valid integral representation of a Scheme object and transforms
44 it into its representation as a @code{SCM} value.