summaryrefslogtreecommitdiffstats
path: root/hash.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-02-01 07:22:40 -0800
committerKaz Kylheku <kaz@kylheku.com>2024-02-01 07:22:40 -0800
commit941f26e314a7b6193cf08d5521c198db2fe2120c (patch)
tree08bc4990f07d3489819940241417f0d5fdf68e69 /hash.c
parent83d4635469b289c06c9f5057a88594045f37f2c3 (diff)
downloadtxr-941f26e314a7b6193cf08d5521c198db2fe2120c.tar.gz
txr-941f26e314a7b6193cf08d5521c198db2fe2120c.tar.bz2
txr-941f26e314a7b6193cf08d5521c198db2fe2120c.zip
hash-eql: regression: always returns zero.
* hash.c (hash_eql): Use hash_traversal_limit for the initial value of the limit rather than zero. Commit 9d11922a82073010d3e2000121b68ed6aaaf28f3 in October 2019 fixed eql_hash to actually make use of the limit, which broke the assumption that we could use zero. * tests/010/hash.tl: Add a few tests for hash-equal and hash-eql.
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 86b980b2..7ebe95a7 100644
--- a/hash.c
+++ b/hash.c
@@ -1418,7 +1418,7 @@ val maphash(val fun, val hash)
val hash_eql(val obj)
{
- int lim = 0;
+ int lim = hash_traversal_limit;
return num_fast(eql_hash(obj, &lim));
}