[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
6.3 The SCM Type
Guile represents all Scheme values with the single C type SCM
.
For an introduction to this topic, See section Dynamic Types.
- C Type: SCM
SCM
is the user level abstract C type that is used to represent all of Guile’s Scheme objects, no matter what the Scheme object type is. No C operation except assignment is guaranteed to work with variables of typeSCM
, so you should only use macros and functions to work withSCM
values. Values are converted between C data types and theSCM
type with utility functions and macros.
- C Type: scm_t_bits
scm_t_bits
is an unsigned integral data type that is guaranteed to be large enough to hold all information that is required to represent any Scheme object. While this data type is mostly used to implement Guile’s internals, the use of this type is also necessary to write certain kinds of extensions to Guile.
- C Macro: scm_t_bits SCM_UNPACK (SCM x)
Transforms the
SCM
value x into its representation as an integral type. Only after applyingSCM_UNPACK
it is possible to access the bits and contents of theSCM
value.
- C Macro: SCM SCM_PACK (scm_t_bits x)
Takes a valid integral representation of a Scheme object and transforms it into its representation as a
SCM
value.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on April 20, 2013 using texi2html 5.0.