1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

4 commits

Author SHA1 Message Date
Taylan Ulrich Bayırlı/Kammer
d545e4551d (rnrs hashtables): Hash functions of eq? and eqv? hashtables
Also pinging this thread with a (very slightly) updated patch. :-)

[2. text/x-diff; 0001-Hashtable-hash-function-returns-f-on-eq-and-eqv-tabl.patch]

From 17599f6ce7ba0beb100e80455ff99af07333d871 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
Date: Tue, 21 Jun 2016 00:23:29 +0200
Subject: [PATCH] Hashtable-hash-function returns #f on eq and eqv tables.

* module/rnrs/hashtables.scm (r6rs:hashtable)[type]: New field.
(r6rs:hashtable-type): New procedure.
* test-suite/tests/r6rs-hashtables.test: Add related tests.
2016-06-21 09:48:36 +02:00
Taylan Ulrich Bayırlı/Kammer
c1abe68dbc (rnrs hashtables): Mutation of immutable hashtable ignored
Pinging this thread with a (very slightly) updated patch. :-)

[2. text/x-diff; 0001-Hashtable-set-errors-on-immutable-hashtable.patch]

From 7f35d515d711e255bba5a89a013d9d92034edf41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <taylanbayirli@gmail.com>
Date: Tue, 21 Jun 2016 00:25:19 +0200
Subject: [PATCH] Hashtable-set! errors on immutable hashtable.

* module/rnrs/hashtables.scm (hashtable-set!): Raise an assertion
  violation error when the hashtable is immutable.
* test-suite/tests/r6rs-hashtables.test: Fix accordingly.
2016-06-21 09:47:07 +02:00
Julian Graham
3fdc1d05ae Fix argument passing for external hash functions in `(rnrs hashtables)'.
Guile implements this library in terms of SRFI-69, which is a bit vague on
the arity of hash functions, whereas `(rnrs hashtables)' explicitly
specifies unary ones.

* module/rnrs/hashtables.scm (wrap-hash-function): Assume SRFI-69 will pass
  the table capacity as the second argument; return the result of proc
  modulo the capacity.

* test-suite/tests/r6rs-hashtables.test (make-hashtable): New test case for
  hash functions that return large values.
2010-07-14 01:16:19 -04:00
Julian Graham
2b95784c8d Fixes and test cases for R6RS (rnrs hashtables) library.
* module/rnrs/6/hashtables.scm: Assorted bugfixes, esp. for wrapping
  single-argument hash functions.
* test-suite/Makefile.am: Add tests/r6rs-hashtables.test to SCM_TESTS.
* test-suite/tests/r6rs-hashtables.test: New file.
2010-05-20 21:18:03 -04:00