diff options
author | Andy Wingo <wingo@pobox.com> | 2009-12-08 21:59:01 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-12-08 23:13:20 +0100 |
commit | 0b1733c7d18cd39c11868a7b091de4c72f69ea8d (patch) | |
tree | df39f7110b52650ef0e4a6c4d9860959da964625 /libguile/throw.c | |
parent | 0e163c06f26f1ec8930183a9e1618eb9f1f0402b (diff) | |
download | guile-0b1733c7d18cd39c11868a7b091de4c72f69ea8d.tar.gz |
SCM_CELL in throw.c
* libguile/throw.c (JBACTIVE, ACTIVATEJB, DEACTIVATEJB, JBJMPBUF)
(SETJBJMPBUF, SCM_JBPREUNWIND, SCM_SETJBPREUNWIND)
(pre_unwind_data_print, scm_ithrow): Fix SCM_CELL macro usage.
Diffstat (limited to 'libguile/throw.c')
-rw-r--r-- | libguile/throw.c | 22 |
1 files changed, 10 insertions, 12 deletions
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, "#<pre-unwind-data 0x%lx 0x%lx>", @@ -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 |