diff --git a/libguile/throw.c b/libguile/throw.c index 051f6d382..fd08e6e70 100644 --- a/libguile/throw.c +++ b/libguile/throw.c @@ -54,16 +54,14 @@ static scm_t_bits tc16_jmpbuffer; #define SCM_JMPBUFP(OBJ) SCM_TYP16_PREDICATE (tc16_jmpbuffer, OBJ) -#define JBACTIVE(OBJ) (SCM_CELL_WORD_0 (OBJ) & (1L << 16L)) -#define ACTIVATEJB(x) \ - (SCM_SET_CELL_WORD_0 ((x), (SCM_CELL_WORD_0 (x) | (1L << 16L)))) -#define DEACTIVATEJB(x) \ - (SCM_SET_CELL_WORD_0 ((x), (SCM_CELL_WORD_0 (x) & ~(1L << 16L)))) +#define JBACTIVE(OBJ) (SCM_SMOB_FLAGS (OBJ) & 1L) +#define ACTIVATEJB(x) (SCM_SET_SMOB_FLAGS ((x), 1L)) +#define DEACTIVATEJB(x) (SCM_SET_SMOB_FLAGS ((x), 0L)) -#define JBJMPBUF(OBJ) ((scm_i_jmp_buf *) SCM_CELL_WORD_1 (OBJ)) -#define SETJBJMPBUF(x, v) (SCM_SET_CELL_WORD_1 ((x), (scm_t_bits) (v))) -#define SCM_JBPREUNWIND(x) ((struct pre_unwind_data *) SCM_CELL_WORD_3 (x)) -#define SCM_SETJBPREUNWIND(x, v) (SCM_SET_CELL_WORD_3 ((x), (scm_t_bits) (v))) +#define JBJMPBUF(OBJ) ((scm_i_jmp_buf *) SCM_SMOB_DATA_1 (OBJ)) +#define SETJBJMPBUF(x, v) (SCM_SET_SMOB_DATA_1 ((x), (scm_t_bits) (v))) +#define SCM_JBPREUNWIND(x) ((struct pre_unwind_data *) SCM_SMOB_DATA_3 (x)) +#define SCM_SETJBPREUNWIND(x, v) (SCM_SET_SMOB_DATA_3 ((x), (scm_t_bits) (v))) static int jmpbuffer_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED) @@ -269,7 +267,7 @@ static scm_t_bits tc16_pre_unwind_data; static int pre_unwind_data_print (SCM closure, SCM port, scm_print_state *pstate SCM_UNUSED) { - struct pre_unwind_data *c = (struct pre_unwind_data *) SCM_CELL_WORD_1 (closure); + struct pre_unwind_data *c = (struct pre_unwind_data *) SCM_SMOB_DATA_1 (closure); char buf[200]; sprintf (buf, "#", @@ -783,7 +781,7 @@ scm_ithrow (SCM key, SCM args, int noreturn SCM_UNUSED) else { struct pre_unwind_data *c = - (struct pre_unwind_data *) SCM_CELL_WORD_1 (jmpbuf); + (struct pre_unwind_data *) SCM_SMOB_DATA_1 (jmpbuf); if (!c->running) break; } @@ -816,7 +814,7 @@ scm_ithrow (SCM key, SCM args, int noreturn SCM_UNUSED) if (SCM_PRE_UNWIND_DATA_P (jmpbuf)) { struct pre_unwind_data *c = - (struct pre_unwind_data *) SCM_CELL_WORD_1 (jmpbuf); + (struct pre_unwind_data *) SCM_SMOB_DATA_1 (jmpbuf); SCM handle, answer; /* For old-style lazy-catch behaviour, we unwind the dynamic