summaryrefslogtreecommitdiff
path: root/src/ht.c
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2022-02-05 17:30:11 +0800
committerJSDurand <mmemmew@gmail.com>2022-02-05 17:30:11 +0800
commit510b10b96b546fcc6c6b6be85050305ddd192a41 (patch)
tree997d6c3f2c0a1ad6e27127d54a94655527e57864 /src/ht.c
parent3fb5430080199a6d92a63f8259fe4a88df9b83ba (diff)
replace some hash table usage by tuples
Previously I used hash tables, which consume too much memory. Now the critical parts are replaced by a new hand-written library called "tuple.h". Now we can easily parse larger inputs. I haven't tested its limits, though.
Diffstat (limited to 'src/ht.c')
-rw-r--r--src/ht.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ht.c b/src/ht.c
index 770eff6..de1db2d 100644
--- a/src/ht.c
+++ b/src/ht.c
@@ -541,7 +541,7 @@ pair4_hf(CCR_MOD(void *) key) {
((pair4 *) key)->x,
((pair4 *) key)->y,
((pair4 *) key)->z,
- ((pair4 *) key)->w);
+ ((pair4 *) key)->u);
/* fleprintf("Hash of (%ld, %ld, %ld) is %ld\n",
* ((pair3 *) key)->x,
@@ -564,7 +564,7 @@ pair4_cf(CCR_MOD(void *) keya, CCR_MOD(void *) keyb) {
return ((pair4 *) keya)->x == ((pair4 *) keyb)->x &&
((pair4 *) keya)->y == ((pair4 *) keyb)->y &&
((pair4 *) keya)->z == ((pair4 *) keyb)->z &&
- ((pair4 *) keya)->w == ((pair4 *) keyb)->w;
+ ((pair4 *) keya)->u == ((pair4 *) keyb)->u;
}
ht *