From unknown Mon Aug 18 11:14:39 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#13843 <13843@debbugs.gnu.org> To: bug#13843 <13843@debbugs.gnu.org> Subject: Status: [PATCH] Fix "later bindings win" stipulation for with-fluids Reply-To: bug#13843 <13843@debbugs.gnu.org> Date: Mon, 18 Aug 2025 18:14:39 +0000 retitle 13843 [PATCH] Fix "later bindings win" stipulation for with-fluids reassign 13843 guile submitter 13843 David Kastrup severity 13843 normal tag 13843 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 28 12:49:21 2013 Received: (at submit) by debbugs.gnu.org; 28 Feb 2013 17:49:21 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-102.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 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 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 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 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 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 Received: by lola (Postfix, from userid 1000) id 6E1832015E8; Thu, 28 Feb 2013 11:04:08 +0100 (CET) From: David Kastrup To: bug-guile@gnu.org Subject: [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> 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-Received-From: 208.118.235.17 X-Spam-Score: -4.9 (----) X-Debbugs-Envelope-To: submit Cc: David Kastrup X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 28 18:50:42 2013 Received: (at 13843-done) by debbugs.gnu.org; 28 Feb 2013 23:50:42 +0000 Received: from localhost ([127.0.0.1]:56927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UBDFJ-0005bb-W4 for submit@debbugs.gnu.org; Thu, 28 Feb 2013 18:50:42 -0500 Received: from world.peace.net ([96.39.62.75]:38681) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UBDFI-0005bU-Q2 for 13843-done@debbugs.gnu.org; Thu, 28 Feb 2013 18:50:41 -0500 Received: from turntable.mit.edu ([18.160.0.29] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UBDDL-000386-05; Thu, 28 Feb 2013 18:48:39 -0500 From: Mark H Weaver To: David Kastrup Subject: Re: bug#13843: [PATCH] Fix "later bindings win" stipulation for with-fluids References: <1362045846-8591-1-git-send-email-dak@gnu.org> Date: Thu, 28 Feb 2013 18:48:15 -0500 In-Reply-To: <1362045846-8591-1-git-send-email-dak@gnu.org> (David Kastrup's message of "Thu, 28 Feb 2013 11:04:06 +0100") Message-ID: <877glsvw3k.fsf@tines.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13843-done Cc: 13843-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Fixed in 8dd01861a9a0331b912a1ae6310e64eb6b47c29c. Thanks! Mark From unknown Mon Aug 18 11:14:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 29 Mar 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator