DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(guile.info.gz) Unpacking the SCM type

Info Catalog (guile.info.gz) Signalling Type Errors (guile.info.gz) How Guile does it
 
 18.2.7 Unpacking the SCM Type
 -----------------------------
 
 The previous sections have explained how `SCM' values can refer to
 immediate and non-immediate Scheme objects.  For immediate objects, the
 complete object value is stored in the `SCM' word itself, while for
 non-immediates, the `SCM' word contains a pointer to a heap cell, and
 further information about the object in question is stored in that
 cell.  This section describes how the `SCM' type is actually
 represented and used at the C level.
 
    In fact, there are two basic C data types to represent objects in
 Guile:
 
  -- Data 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 type `SCM', so you should only use macros and
      functions to work with `SCM' values.  Values are converted between
      C data types and the `SCM' type with utility functions and macros.
    
  -- Data type: scm_t_bits
      `scm_t_bits' is an 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.
 

Menu

 
* Relationship between SCM and scm_t_bits
* Immediate objects
* Non-immediate objects
* Heap Cell Type Information
* Accessing Cell Entries
* Basic Rules for Accessing Cell Entries
 
Info Catalog (guile.info.gz) Signalling Type Errors (guile.info.gz) How Guile does it
automatically generated byinfo2html