diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-10-12 00:53:30 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-10-12 00:53:30 -0700 |
commit | ede1079e13ac0cbdcc63738f8a3414fefaa0c48d (patch) | |
tree | f69926438c89111224da72189aca2f2b169ad08f /lib.h | |
parent | f557c6110536ed4dcf1191386ac1e63ae35b03f0 (diff) | |
download | txr-ede1079e13ac0cbdcc63738f8a3414fefaa0c48d.tar.gz txr-ede1079e13ac0cbdcc63738f8a3414fefaa0c48d.tar.bz2 txr-ede1079e13ac0cbdcc63738f8a3414fefaa0c48d.zip |
hash: use ucnum for hash values everywhere.
One consequence of this is that we no longer pass negative
values to vecref; that functon was protecting us from the
consequences of this signed/unsigned mixup, at the cost of
cyles.
* hash.c (struct hash_ops): hash parameter in assoc_fun and
acons_new_c_fun pointers changes from cnum to ucnum.
(hash_assoc, hash_assql, hash_assq): hash parameter changes to
ucnum.
(hash_acons_new_c, hash_aconsql_new_c, hash_aconsq_new_c):
Likewise.
(gethash_c, gethash_e, remhash): Variable which captures the output of the hashing
function is now ucnum instead of cnum.
* lib.h (struct cons_hash_entry): Member hash changes from
cnum to ucnum.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -114,7 +114,7 @@ struct cons { struct cons_hash_entry { obj_common; val car, cdr; - cnum hash; + ucnum hash; }; struct string { |