DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(guile.info.gz) Basic Rules for Accessing Cell Entries

Info Catalog (guile.info.gz) Accessing Cell Entries (guile.info.gz) Unpacking the SCM type
 
 18.2.7.6 Basic Rules for Accessing Cell Entries
 ...............................................
 
 For each cell type it is generally up to the implementation of that type
 which of the corresponding cell entries hold Scheme objects and which
 hold raw C values.  However, there is one basic rule that has to be
 followed: Scheme pairs consist of exactly two cell entries, which both
 contain Scheme objects.  Further, a cell which contains a Scheme object
 in it first entry has to be a Scheme pair.  In other words, it is not
 allowed to store a Scheme object in the first cell entry and a non
 Scheme object in the second cell entry.
 
  -- Macro: int SCM_CONSP (SCM X)
      Determine, whether the Scheme object X is a Scheme pair, i.e.
      whether X references a heap cell consisting of exactly two
      entries, where both entries contain a Scheme object.  In this
      case, both entries will have to be accessed using the
      `SCM_CELL_OBJECT' macros.  On the contrary, if the `SCM_CONSP'
      predicate is not fulfilled, the first entry of the Scheme cell is
      guaranteed not to be a Scheme value and thus the first cell entry
      must be accessed using the `SCM_CELL_WORD_0' macro.
 
Info Catalog (guile.info.gz) Accessing Cell Entries (guile.info.gz) Unpacking the SCM type
automatically generated byinfo2html