1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

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.
This commit is contained in:
Andy Wingo 2008-10-09 11:09:43 +02:00
parent 11ea1aba9e
commit 5a9634892f

View file

@ -323,7 +323,7 @@ scm_i_dowinds (SCM to, long delta, void (*turn_func) (void *), void *data)
if (SCM_VARIABLEP (SCM_CAR (wind_key))) if (SCM_VARIABLEP (SCM_CAR (wind_key)))
scm_swap_bindings (wind_key, SCM_CDR (wind_elt)); 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); 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))) if (SCM_VARIABLEP (SCM_CAR (wind_key)))
scm_swap_bindings (wind_key, SCM_CDR (wind_elt)); 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)); scm_call_0 (SCM_CDR (wind_elt));
} }
} }