From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: taylanbayirli@gmail.com (Taylan Ulrich =?UTF-8?Q?Bay=C4=B1rl=C4=B1/Kammer?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#22447: (rnrs hashtables): Mutation of immutable hashtable ignored Date: Sun, 24 Jan 2016 00:19:17 +0100 Message-ID: <87lh7fkhoq.fsf@T420.taylan> References: <87zivwj8ne.fsf@T420.taylan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1453590922 8102 80.91.229.3 (23 Jan 2016 23:15:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Jan 2016 23:15:22 +0000 (UTC) To: 22447@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Jan 24 00:15:13 2016 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 1aN7Oi-0002rj-75 for guile-bugs@m.gmane.org; Sun, 24 Jan 2016 00:15:12 +0100 Original-Received: from localhost ([::1]:58799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN7Oh-0000sW-Ae for guile-bugs@m.gmane.org; Sat, 23 Jan 2016 18:15:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN7Od-0000sI-FL for bug-guile@gnu.org; Sat, 23 Jan 2016 18:15:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aN7OY-0006fr-FA for bug-guile@gnu.org; Sat, 23 Jan 2016 18:15:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN7OY-0006fn-AU for bug-guile@gnu.org; Sat, 23 Jan 2016 18:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aN7OY-0001yE-4E for bug-guile@gnu.org; Sat, 23 Jan 2016 18:15:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87zivwj8ne.fsf@T420.taylan> Resent-From: taylanbayirli@gmail.com (Taylan Ulrich =?UTF-8?Q?Bay=C4=B1rl=C4=B1/Kammer?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 23 Jan 2016 23:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22447 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 22447-submit@debbugs.gnu.org id=B22447.14535908997536 (code B ref 22447); Sat, 23 Jan 2016 23:15:02 +0000 Original-Received: (at 22447) by debbugs.gnu.org; 23 Jan 2016 23:14:59 +0000 Original-Received: from localhost ([127.0.0.1]:60870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN7OV-0001xU-GZ for submit@debbugs.gnu.org; Sat, 23 Jan 2016 18:14:59 -0500 Original-Received: from mail-wm0-f48.google.com ([74.125.82.48]:37790) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN7OT-0001xE-TC for 22447@debbugs.gnu.org; Sat, 23 Jan 2016 18:14:58 -0500 Original-Received: by mail-wm0-f48.google.com with SMTP id n5so30262161wmn.0 for <22447@debbugs.gnu.org>; Sat, 23 Jan 2016 15:14:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=dogx6vfc5fCLDmUcFH1Kr6SwDgXNBlattYqsyM9xyOc=; b=NMhoHn0DB/ENcAhvNsHIC2o9ZEsP71TFF/KnXPGTCDhFgAMF3Qrk9wTyYGVgUqoogP JnycbcyLzc3+zZx9bXzaj7J1rWoe9lWlBlOspOtpCFF3ZGBrnlJcwxOKnvdjGChlvuJF DtXTVXNRysgCimuu7jNNx/Z2Gs9SwKUVNCWvThb0QxTfWzBKlh3iT/bRbihvi8NXohV/ /Phmd/JYoeX0gVNZfB4JQEfodgKdhHC8a4ZPGr4p5vZW12BWGbgRnYV0Pmyc4+yuanz0 t4sHN7Z2tuUjg2DksjrZGXRtRP7oVaaExkMFcIgqoDel2W9SyIAztXgTqc3qMhCQRX1A rGng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version:content-type; bh=dogx6vfc5fCLDmUcFH1Kr6SwDgXNBlattYqsyM9xyOc=; b=K6srfmf6CAfY9exZsf4kmLZsuQB92RZYdhs3kAho6q3D8pZLb/4caWeYYjzTS1ICT8 q9wlJQ7hqAR6/WC95Mx1xeTOi77haUn5Cr6PI9ZA8+uwazk0oSQIHahCWCNeRUAaiBVR bGC17uwnQIib5k80GsIJ+pGslIcigLQ9WNhGZ/tlUBbZBpe55Ceh1egIGAo3JiQPE8Pz 718uGdqE18QIF2jcq5lWAeFCRrghkqdqqWROy4u/GVd8K+8Ak5+yuaFpySyRmse7VSFQ qotka57M4NJzW1NAbG0HKrQ1NIl/1QGnsw7sEoG+JRftTcfyiL/DyzaovwenSpFrvV5f Neag== X-Gm-Message-State: AG10YOSqxtFPxLgUNGGL8qc3BGc+E/ebeoPBhuST7167by5dCZ/fC67MGZJn29Dvcbs2FQ== X-Received: by 10.194.22.132 with SMTP id d4mr10044079wjf.174.1453590892325; Sat, 23 Jan 2016 15:14:52 -0800 (PST) Original-Received: from T420.taylan ([2a02:908:c30:3ec0:221:ccff:fe66:68f0]) by smtp.gmail.com with ESMTPSA id r10sm12126789wjz.24.2016.01.23.15.14.51 for <22447@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Jan 2016 15:14:51 -0800 (PST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:7942 Archived-At: --=-=-= Content-Type: text/plain Sorry about the duplicate bug report; I merged it into this one. Here's the patch again. (Merged report seemed invisible in the web interface.) --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Hashtable-set-errors-on-immutable-hashtable.patch >From dd6c4bbbe85a57fcbb08bdc7847075bddc1f0d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Sat, 23 Jan 2016 22:35:24 +0100 Subject: [PATCH] Hashtable-set! errors on immutable hashtable. * module/rnrs/hashtables.scm (hashtable-set!): Raise an assertion violation error when the hashtable is immutable. --- module/rnrs/hashtables.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/rnrs/hashtables.scm b/module/rnrs/hashtables.scm index 98d2d76..5773eb1 100644 --- a/module/rnrs/hashtables.scm +++ b/module/rnrs/hashtables.scm @@ -122,8 +122,9 @@ (define (hashtable-set! hashtable key obj) (if (r6rs:hashtable-mutable? hashtable) - (hash-table-set! (r6rs:hashtable-wrapped-table hashtable) key obj)) - *unspecified*) + (hash-table-set! (r6rs:hashtable-wrapped-table hashtable) key obj) + (assertion-violation + 'hashtable-set! "Hashtable is immutable." hashtable))) (define (hashtable-delete! hashtable key) (if (r6rs:hashtable-mutable? hashtable) -- 2.6.3 --=-=-=--