unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#13843: [PATCH] Fix "later bindings win" stipulation for with-fluids
@ 2013-02-28 10:04 David Kastrup
  2013-02-28 23:48 ` Mark H Weaver
  0 siblings, 1 reply; 2+ messages in thread
From: David Kastrup @ 2013-02-28 10:04 UTC (permalink / raw)
  To: 13843; +Cc: David Kastrup

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






^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#13843: [PATCH] Fix "later bindings win" stipulation for with-fluids
  2013-02-28 10:04 bug#13843: [PATCH] Fix "later bindings win" stipulation for with-fluids David Kastrup
@ 2013-02-28 23:48 ` Mark H Weaver
  0 siblings, 0 replies; 2+ messages in thread
From: Mark H Weaver @ 2013-02-28 23:48 UTC (permalink / raw)
  To: David Kastrup; +Cc: 13843-done

Fixed in 8dd01861a9a0331b912a1ae6310e64eb6b47c29c.

   Thanks!
     Mark





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-28 23:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-28 10:04 bug#13843: [PATCH] Fix "later bindings win" stipulation for with-fluids David Kastrup
2013-02-28 23:48 ` Mark H Weaver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).