summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-01-07 20:21:30 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-01-07 20:21:30 +0000
commit14578fa4ea21173bd8360f4ba6e0660028769b42 (patch)
tree97e1213901932553c55c2a0beab7b7dd55aafe8c
parent96e3b2f8088df3406564cf39dea624ceb4999d5c (diff)
downloadguile-14578fa4ea21173bd8360f4ba6e0660028769b42.tar.gz
* dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
argument since it is always zero now. Changed all callers. Removed code for handling fluids.
-rw-r--r--libguile/continuations.c3
-rw-r--r--libguile/dynwind.c29
-rw-r--r--libguile/dynwind.h2
3 files changed, 11 insertions, 23 deletions
diff --git a/libguile/continuations.c b/libguile/continuations.c
index 996d5eebf..60322b3af 100644
--- a/libguile/continuations.c
+++ b/libguile/continuations.c
@@ -239,8 +239,7 @@ copy_stack_and_call (scm_t_contregs *continuation, SCM val,
delta = scm_ilength (scm_dynwinds) - scm_ilength (continuation->dynenv);
data.continuation = continuation;
data.dst = dst;
- scm_i_dowinds (continuation->dynenv, delta, 0,
- copy_stack, &data);
+ scm_i_dowinds (continuation->dynenv, delta, copy_stack, &data);
scm_last_debug_frame = continuation->dframe;
diff --git a/libguile/dynwind.c b/libguile/dynwind.c
index 6c2cb6709..ca2fb704d 100644
--- a/libguile/dynwind.c
+++ b/libguile/dynwind.c
@@ -136,9 +136,9 @@ static scm_t_bits tc16_frame;
#define FRAME_REWINDABLE_P(f) (SCM_CELL_WORD_0(f) & FRAME_F_REWINDABLE)
static scm_t_bits tc16_winder;
-#define WINDER_P(w) SCM_SMOB_PREDICATE (tc16_winder, (w))
-#define WINDER_PROC(w) ((void (*)(void *))SCM_CELL_WORD_1 (w))
-#define WINDER_DATA(w) ((void *)SCM_CELL_WORD_2 (w))
+#define WINDER_P(w) SCM_SMOB_PREDICATE (tc16_winder, (w))
+#define WINDER_PROC(w) ((void (*)(void *))SCM_CELL_WORD_1 (w))
+#define WINDER_DATA(w) ((void *)SCM_CELL_WORD_2 (w))
#define WINDER_F_EXPLICIT (1 << 16)
#define WINDER_F_REWIND (1 << 17)
@@ -263,12 +263,11 @@ scm_swap_bindings (SCM vars, SCM vals)
void
scm_dowinds (SCM to, long delta)
{
- scm_i_dowinds (to, delta, 0, NULL, NULL);
+ scm_i_dowinds (to, delta, NULL, NULL);
}
void
-scm_i_dowinds (SCM to, long delta, int explicit,
- void (*turn_func) (void *), void *data)
+scm_i_dowinds (SCM to, long delta, void (*turn_func) (void *), void *data)
{
tail:
if (SCM_EQ_P (to, scm_dynwinds))
@@ -281,8 +280,7 @@ scm_i_dowinds (SCM to, long delta, int explicit,
SCM wind_elt;
SCM wind_key;
- scm_i_dowinds (SCM_CDR (to), 1 + delta, explicit,
- turn_func, data);
+ scm_i_dowinds (SCM_CDR (to), 1 + delta, turn_func, data);
wind_elt = SCM_CAR (to);
#if 0
@@ -303,11 +301,7 @@ scm_i_dowinds (SCM to, long delta, int explicit,
else if (WINDER_P (wind_elt))
{
if (WINDER_REWIND_P (wind_elt))
- {
- void (*proc) (void *) = WINDER_PROC (wind_elt);
- void *data = WINDER_DATA (wind_elt);
- proc (data);
- }
+ WINDER_PROC (wind_elt) (WINDER_DATA (wind_elt));
}
else
{
@@ -349,13 +343,8 @@ scm_i_dowinds (SCM to, long delta, int explicit,
}
else if (WINDER_P (wind_elt))
{
- if (!WINDER_REWIND_P (wind_elt)
- && (!explicit || WINDER_EXPLICIT_P (wind_elt)))
- {
- void (*proc) (void *) = WINDER_PROC (wind_elt);
- void *data = WINDER_DATA (wind_elt);
- proc (data);
- }
+ if (!WINDER_REWIND_P (wind_elt))
+ WINDER_PROC (wind_elt) (WINDER_DATA (wind_elt));
}
else
{
diff --git a/libguile/dynwind.h b/libguile/dynwind.h
index bf14126a1..f619b46b5 100644
--- a/libguile/dynwind.h
+++ b/libguile/dynwind.h
@@ -36,7 +36,7 @@ SCM_API SCM scm_internal_dynamic_wind (scm_t_guard before,
void *inner_data,
void *guard_data);
SCM_API void scm_dowinds (SCM to, long delta);
-SCM_API void scm_i_dowinds (SCM to, long delta, int explicit,
+SCM_API void scm_i_dowinds (SCM to, long delta,
void (*turn_func) (void *), void *data);
SCM_API void scm_init_dynwind (void);