[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13843: [PATCH] Fix "later bindings win" stipulation for with-fluids
From: |
David Kastrup |
Subject: |
bug#13843: [PATCH] Fix "later bindings win" stipulation for with-fluids |
Date: |
Thu, 28 Feb 2013 11:04:06 +0100 |
The following code displayed 2:
(define a (make-fluid))
(with-fluids ((a 1) (a 2) (a 3))
(display (fluid-ref a)))
---
libguile/fluids.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libguile/fluids.c b/libguile/fluids.c
index bd59e26..11309c9 100644
--- a/libguile/fluids.c
+++ b/libguile/fluids.c
@@ -321,7 +321,7 @@ scm_i_make_with_fluids (size_t n, SCM *fluids, SCM *vals)
size_t i, j = n;
while (j--)
- for (i = 0; i < j; i++)
+ for (i = j; i--;)
if (scm_is_eq (fluids[i], fluids[j]))
{
vals[i] = vals[j]; /* later bindings win */
--
1.7.10.4
- bug#13843: [PATCH] Fix "later bindings win" stipulation for with-fluids,
David Kastrup <=