66 |
Non immediate objects |
Non immediate objects |
67 |
===================== |
===================== |
68 |
|
|
69 |
- (scm_cell *) SCM2PTR (SCM x) (FIXME:: this name should be changed) |
- (scm_t_cell *) SCM2PTR (SCM x) (FIXME:: this name should be changed) |
70 |
- SCM PTR2SCM (scm_cell * x) (FIXME:: this name should be changed) |
- SCM PTR2SCM (scm_t_cell * x) (FIXME:: this name should be changed) |
71 |
|
|
72 |
A scheme object of type SCM that does not fullfill the SCM_IMP predicate holds |
A scheme object of type SCM that does not fullfill the SCM_IMP predicate holds |
73 |
an encoded reference to a heap cell. This reference can be decoded to a C |
an encoded reference to a heap cell. This reference can be decoded to a C |
76 |
|
|
77 |
Note that it is also possible to transform a non immediate SCM value by using |
Note that it is also possible to transform a non immediate SCM value by using |
78 |
SCM_UNPACK into a scm_bits_t variable. Hower, the result of SCM_UNPACK may |
SCM_UNPACK into a scm_bits_t variable. Hower, the result of SCM_UNPACK may |
79 |
not be used as a pointer to a scm_cell: Only SCM2PTR is guaranteed to |
not be used as a pointer to a scm_t_cell: Only SCM2PTR is guaranteed to |
80 |
transform a SCM object into a valid pointer to a heap cell. Also, it is not |
transform a SCM object into a valid pointer to a heap cell. Also, it is not |
81 |
allowed to apply PTR2SCM to anything that is not a valid pointer to a heap |
allowed to apply PTR2SCM to anything that is not a valid pointer to a heap |
82 |
cell. |
cell. |
83 |
|
|
84 |
Summary: |
Summary: |
85 |
* Only use SCM2PTR for SCM values for which SCM_IMP is false! |
* Only use SCM2PTR for SCM values for which SCM_IMP is false! |
86 |
* Don't use '(scm_cell*) SCM_UNPACK (x)'! Use 'SCM2PTR (x)' instead! |
* Don't use '(scm_t_cell*) SCM_UNPACK (x)'! Use 'SCM2PTR (x)' instead! |
87 |
* Don't use PTR2SCM for anything but a cell pointer! |
* Don't use PTR2SCM for anything but a cell pointer! |
88 |
|
|
89 |
|
|