Previous: Heap Object Type Information, Up: The SCM Type in Guile [Contents][Index]
For a non-immediate Scheme object x, the object type can be
determined by using the SCM_CELL_TYPE
macro described in the
previous section. For each different type of heap object it is known
which fields hold tagged Scheme objects and which fields hold untagged
raw data. To access the different fields appropriately, the following
macros are provided.
Deliver the field n of the heap object referenced by the
non-immediate Scheme object x as raw untagged data. Only use this
macro for fields containing untagged data; don’t use it for fields
containing tagged SCM
objects.
Deliver the field n of the heap object referenced by the
non-immediate Scheme object x as a Scheme object. Only use this
macro for fields containing tagged SCM
objects; don’t use it for
fields containing untagged data.
Write the raw value w into field number n of the heap object
referenced by the non-immediate Scheme value x. Values that are
written into heap objects as raw values should only be read later using
the SCM_CELL_WORD
macros.
Write the Scheme object o into field number n of the heap
object referenced by the non-immediate Scheme value x. Values
that are written into heap objects as objects should only be read using
the SCM_CELL_OBJECT
macros.
Summary:
SCM_CELL_TYPE (x)
.
Previous: Heap Object Type Information, Up: The SCM Type in Guile [Contents][Index]