summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-05-05 00:44:54 +0200
committerLudovic Courtès <ludo@gnu.org>2012-05-05 00:44:54 +0200
commite9c898bf24c2faf86d3d2f61361bc52ff3abc8b2 (patch)
tree4d85e98fda53eb81333b6a481e4415bfb3670e01
parentb662b7e971423934b897f925ccc3061fc640e996 (diff)
downloadguile-e9c898bf24c2faf86d3d2f61361bc52ff3abc8b2.tar.gz
Correct typing of assertion in the `wind' instruction.
* libguile/vm-i-system.c (wind): Check `scm_to_bool (scm_thunk_p (x))' instead of `scm_thunk_p'.
-rw-r--r--libguile/vm-i-system.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c
index 3ac0097b4..2399fa065 100644
--- a/libguile/vm-i-system.c
+++ b/libguile/vm-i-system.c
@@ -1570,8 +1570,10 @@ VM_DEFINE_INSTRUCTION (86, wind, "wind", 0, 2, 0)
/* Push wind and unwind procedures onto the dynamic stack. Note that neither
are actually called; the compiler should emit calls to wind and unwind for
the normal dynamic-wind control flow. */
- VM_ASSERT (scm_thunk_p (wind), vm_error_not_a_thunk ("dynamic-wind", wind));
- VM_ASSERT (scm_thunk_p (unwind), vm_error_not_a_thunk ("dynamic-wind", unwind));
+ VM_ASSERT (scm_to_bool (scm_thunk_p (wind)),
+ vm_error_not_a_thunk ("dynamic-wind", wind));
+ VM_ASSERT (scm_to_bool (scm_thunk_p (unwind)),
+ vm_error_not_a_thunk ("dynamic-wind", unwind));
scm_i_set_dynwinds (scm_cons (scm_cons (wind, unwind), scm_i_dynwinds ()));
NEXT;
}