From: Andy Wingo Date: Thu, 9 Oct 2008 09:09:43 +0000 (+0200) Subject: fix dynwind + nonlocal entrance/exit + programs bug X-Git-Url: https://git.hcoop.net/bpt/guile.git/commitdiff_plain/5a9634892fb0f68693654d8a59fb75b5747118dc fix dynwind + nonlocal entrance/exit + programs bug * libguile/dynwind.c (scm_i_dowinds): Invoke guard procedures when entering and exiting nonlocally. Previously this procedure was program-racist. --- diff --git a/libguile/dynwind.c b/libguile/dynwind.c index d856affd4..999ba23e0 100644 --- a/libguile/dynwind.c +++ b/libguile/dynwind.c @@ -323,7 +323,7 @@ scm_i_dowinds (SCM to, long delta, void (*turn_func) (void *), void *data) if (SCM_VARIABLEP (SCM_CAR (wind_key))) scm_swap_bindings (wind_key, SCM_CDR (wind_elt)); } - else if (SCM_TYP3 (wind_key) == scm_tc3_closure) + else if (scm_is_true (scm_thunk_p (wind_key))) scm_call_0 (wind_key); } } @@ -359,7 +359,7 @@ scm_i_dowinds (SCM to, long delta, void (*turn_func) (void *), void *data) if (SCM_VARIABLEP (SCM_CAR (wind_key))) scm_swap_bindings (wind_key, SCM_CDR (wind_elt)); } - else if (SCM_TYP3 (wind_key) == scm_tc3_closure) + else if (scm_is_true (scm_thunk_p (wind_key))) scm_call_0 (SCM_CDR (wind_elt)); } }