Subject: bug#13843: closed (Re: bug#13843: [PATCH] Fix "later bindings win" stipulation for with-fluids)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 28 Feb 2013 23:51:02 +0000

Your bug report

#13843: [PATCH] Fix "later bindings win" stipulation for with-fluids

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
13843: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13843
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#13843: [PATCH] Fix "later bindings win" stipulation for with-fluids
From: Mark H Weaver <[email-masked]>
To: David Kastrup <[email-masked]>
Cc: [email-masked]
Date: Thu, 28 Feb 2013 18:48:15 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Fixed in 8dd01861a9a0331b912a1ae6310e64eb6b47c29c.

   Thanks!
     Mark

Subject: [PATCH] Fix "later bindings win" stipulation for with-fluids
From: David Kastrup <[email-masked]>
To: [email-masked]
Cc: David Kastrup <[email-masked]>
Date: Thu, 28 Feb 2013 11:04:06 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

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