Node:Heap Cell Type Information, 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_t_bits. 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.

scm_t_bits SCM_CELL_TYPE (SCM x) Macro
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.

void SCM_SET_CELL_TYPE (SCM x, scm_t_bits t) Macro
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.