diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2024-02-01 07:22:40 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2024-02-01 07:22:40 -0800 |
commit | 941f26e314a7b6193cf08d5521c198db2fe2120c (patch) | |
tree | 08bc4990f07d3489819940241417f0d5fdf68e69 /hash.c | |
parent | 83d4635469b289c06c9f5057a88594045f37f2c3 (diff) | |
download | txr-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)); } |