diff options
Diffstat (limited to 'libguile/procs.h')
-rw-r--r-- | libguile/procs.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libguile/procs.h b/libguile/procs.h index 942385d7d..0a3de0374 100644 --- a/libguile/procs.h +++ b/libguile/procs.h @@ -74,7 +74,17 @@ typedef struct #define SCM_SUBRF(x) ((SCM (*)()) SCM_CELL_WORD_1 (x)) #define SCM_SET_SUBRF(x, v) (SCM_SET_CELL_WORD_1 ((x), (v))) #define SCM_DSUBRF(x) ((double (*)()) SCM_CELL_WORD_1 (x)) -#define SCM_CCLO_SUBR(x) (SCM_VELTS(x)[0]) + +#define SCM_CCLO_LENGTH(x) (SCM_CELL_WORD_0 (x) >> 8) +#define SCM_SET_CCLO_LENGTH(x, v) (SCM_SET_CELL_WORD_0 ((x), ((v) << 8) + scm_tc7_cclo)) +#define SCM_CCLO_BASE(x) ((scm_bits_t *) SCM_CELL_WORD_1 (x)) +#define SCM_SET_CCLO_BASE(x, v) (SCM_SET_CELL_WORD_1 ((x), (v))) + +#define SCM_CCLO_REF(x, i) (SCM_PACK (SCM_CCLO_BASE (x) [i])) +#define SCM_CCLO_SET(x, i, v) (SCM_CCLO_BASE (x) [i] = SCM_UNPACK (v)) + +#define SCM_CCLO_SUBR(x) (SCM_CCLO_REF ((x), 0)) +#define SCM_SET_CCLO_SUBR(x, v) (SCM_CCLO_SET ((x), 0, (v))) #define SCM_SUBR_GENERIC(x) (SCM_SUBR_ENTRY (x).generic) #define SCM_SUBR_PROPS(x) (SCM_SUBR_ENTRY (x).properties) |