Warning: This is the manual of the legacy Guile 2.2 series. You may want to read the manual of the current stable series instead.
Previous: Heap Cell Type Information, Up: The SCM Type in Guile [Contents][Index]
For a non-immediate Scheme object x, the object type can be
determined by reading the cell type entry using the SCM_CELL_TYPE
macro. For each different type of cell it is known which cell entries
hold Scheme objects and which cell entries hold raw C data. To access
the different cell entries appropriately, the following macros are
provided.
Deliver the cell entry n of the heap cell referenced by the non-immediate Scheme object x as raw data. It is illegal, to access cell entries that hold Scheme objects by using these macros. For convenience, the following macros are also provided.
Deliver the cell entry n of the heap cell referenced by the non-immediate Scheme object x as a Scheme object. It is illegal, to access cell entries that do not hold Scheme objects by using these macros. For convenience, the following macros are also provided.
Write the raw C value w into entry number n of the heap cell
referenced by the non-immediate Scheme value x. Values that are
written into cells this way may only be read from the cells using the
SCM_CELL_WORD
macros or, in case cell entry 0 is written, using
the SCM_CELL_TYPE
macro. For the special case of cell entry 0 it
has to be made sure that w contains a cell type information which
does not describe a Scheme object. For convenience, the following
macros are also provided.
Write the Scheme object o into entry number n of the heap
cell referenced by the non-immediate Scheme value x. Values that
are written into cells this way may only be read from the cells using
the SCM_CELL_OBJECT
macros or, in case cell entry 0 is written,
using the SCM_CELL_TYPE
macro. For the special case of cell
entry 0 the writing of a Scheme object into this cell is only allowed
if the cell forms a Scheme pair. For convenience, the following macros
are also provided.
Summary:
SCM_CELL_TYPE (x)
.
Previous: Heap Cell Type Information, Up: The SCM Type in Guile [Contents][Index]