diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-12-20 14:54:06 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-12-20 14:54:06 -0800 |
commit | f16d4a0947c00f5256aad67ddca906948a25b4a4 (patch) | |
tree | b25dbd64901c2ea4b2d3e3295d46fc5eff701cf3 /hash.h | |
parent | d19d3af151798c90e967276bd4f03d7db5536056 (diff) | |
download | txr-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.h | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -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); |