summaryrefslogtreecommitdiffstats
path: root/hash.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-12-20 14:54:06 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-12-20 14:54:06 -0800
commitf16d4a0947c00f5256aad67ddca906948a25b4a4 (patch)
treeb25dbd64901c2ea4b2d3e3295d46fc5eff701cf3 /hash.h
parentd19d3af151798c90e967276bd4f03d7db5536056 (diff)
downloadtxr-f16d4a0947c00f5256aad67ddca906948a25b4a4.tar.gz
txr-f16d4a0947c00f5256aad67ddca906948a25b4a4.tar.bz2
txr-f16d4a0947c00f5256aad67ddca906948a25b4a4.zip
Critical regression. Hash lookup was crashing on some platforms
due to negative hashing values being reduced modulo table size to a negative array index. * hash.c (equal_hash, eql_hash): Ensure that value returned is in the range [0,NUM_MAX]. (hash_obj): Unused function removed. (cobj_hash_op): Use hashing similar to eql hash for other kinds of references. (hash_eql, hash_equal): Removed bogus % NUM_MAX reduction. * hash.h (hash_obj): Declaration removed.
Diffstat (limited to 'hash.h')
-rw-r--r--hash.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/hash.h b/hash.h
index a5a7ba06..c425aabf 100644
--- a/hash.h
+++ b/hash.h
@@ -24,7 +24,6 @@
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-val hash_obj(val);
val make_hash(val weak_keys, val weak_vals, val equal_based);
val *gethash_l(val hash, val key, val *new_p);
val gethash(val hash, val key);