Next: , Previous: Non-immediate objects, Up: Unpacking the SCM type


18.2.7.4 Heap Cell Type Information

Heap cells contain a number of entries, each of which is either a scheme object of type SCM or a raw C value of type scm_bits_t. Which of the cell entries contain Scheme objects and which contain raw C values is determined by the first entry of the cell, which holds the cell type information.

— C Macro: scm_bits_t SCM_CELL_TYPE (SCM x)

For a non-immediate Scheme object x, deliver the content of the first entry of the heap cell referenced by x. This value holds the information about the cell type.

— C Macro: void SCM_SET_CELL_TYPE (SCM x, scm_bits_t t)

For a non-immediate Scheme object x, write the value t into the first entry of the heap cell referenced by x. The value t must hold a valid cell type.