summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-10-12 00:53:30 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-10-12 00:53:30 -0700
commitede1079e13ac0cbdcc63738f8a3414fefaa0c48d (patch)
treef69926438c89111224da72189aca2f2b169ad08f /lib.h
parentf557c6110536ed4dcf1191386ac1e63ae35b03f0 (diff)
downloadtxr-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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.h b/lib.h
index 7c8a582b..a57442a4 100644
--- a/lib.h
+++ b/lib.h
@@ -114,7 +114,7 @@ struct cons {
struct cons_hash_entry {
obj_common;
val car, cdr;
- cnum hash;
+ ucnum hash;
};
struct string {