From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.lisp.guile.bugs Subject: bug#13843: [PATCH] Fix "later bindings win" stipulation for with-fluids Date: Thu, 28 Feb 2013 11:04:06 +0100 Message-ID: <1362045846-8591-1-git-send-email-dak@gnu.org> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1362073689 12535 80.91.229.3 (28 Feb 2013 17:48:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Feb 2013 17:48:09 +0000 (UTC) Cc: David Kastrup To: 13843@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Feb 28 18:48:33 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UB7ap-00087l-S0 for guile-bugs@m.gmane.org; Thu, 28 Feb 2013 18:48:31 +0100 Original-Received: from localhost ([::1]:56515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB7aU-0003er-UW for guile-bugs@m.gmane.org; Thu, 28 Feb 2013 12:48:10 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB7aR-0003eX-Ae for bug-guile@gnu.org; Thu, 28 Feb 2013 12:48:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UB7aP-0005n2-Lr for bug-guile@gnu.org; Thu, 28 Feb 2013 12:48:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB7aP-0005mo-It for bug-guile@gnu.org; Thu, 28 Feb 2013 12:48:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UB7cI-0004VA-6r for bug-guile@gnu.org; Thu, 28 Feb 2013 12:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: David Kastrup Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 28 Feb 2013 17:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13843 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.136207376117236 (code B ref -1); Thu, 28 Feb 2013 17:50:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Feb 2013 17:49:21 +0000 Original-Received: from localhost ([127.0.0.1]:56544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UB7bc-0004Tw-BA for submit@debbugs.gnu.org; Thu, 28 Feb 2013 12:49:20 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47608) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UB7bZ-0004To-TV for submit@debbugs.gnu.org; Thu, 28 Feb 2013 12:49:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UB7Zf-0005a7-I7 for submit@debbugs.gnu.org; Thu, 28 Feb 2013 12:47:20 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:37094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB7Zf-0005Zz-Ds for submit@debbugs.gnu.org; Thu, 28 Feb 2013 12:47:19 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:58945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB7Ze-0003DJ-62 for bug-guile@gnu.org; Thu, 28 Feb 2013 12:47:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UB7Zd-0005Yr-86 for bug-guile@gnu.org; Thu, 28 Feb 2013 12:47:18 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB7Zd-0005Ym-5K for bug-guile@gnu.org; Thu, 28 Feb 2013 12:47:17 -0500 Original-Received: from localhost ([127.0.0.1]:40855 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB7Zc-0001AC-BT; Thu, 28 Feb 2013 12:47:16 -0500 Original-Received: by lola (Postfix, from userid 1000) id 6E1832015E8; Thu, 28 Feb 2013 11:04:08 +0100 (CET) X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6808 Archived-At: 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