(guile.info.gz) Immediate objects
Info Catalog
(guile.info.gz) Relationship between SCM and scm_t_bits
(guile.info.gz) Unpacking the SCM type
(guile.info.gz) Non-immediate objects
18.2.7.2 Immediate objects
..........................
A Scheme object may either be an immediate, i.e. carrying all necessary
information by itself, or it may contain a reference to a "cell" with
additional information on the heap. Although in general it should be
irrelevant for user code whether an object is an immediate or not,
within Guile's own code the distinction is sometimes of importance.
Thus, the following low level macro is provided:
-- Macro: int SCM_IMP (SCM X)
A Scheme object is an immediate if it fulfills the `SCM_IMP'
predicate, otherwise it holds an encoded reference to a heap cell.
The result of the predicate is delivered as a C style boolean
value. User code and code that extends Guile should normally not
be required to use this macro.
Summary:
* Given a Scheme object X of unknown type, check first with `SCM_IMP
(X)' if it is an immediate object.
* If so, all of the type and value information can be determined
from the `scm_t_bits' value that is delivered by `SCM_UNPACK (X)'.
Info Catalog
(guile.info.gz) Relationship between SCM and scm_t_bits
(guile.info.gz) Unpacking the SCM type
(guile.info.gz) Non-immediate objects
automatically generated byinfo2html