From 510b10b96b546fcc6c6b6be85050305ddd192a41 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Sat, 5 Feb 2022 17:30:11 +0800 Subject: 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. --- src/test/check_ht.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/test/check_ht.c') diff --git a/src/test/check_ht.c b/src/test/check_ht.c index 62a7bee..dd94eab 100644 --- a/src/test/check_ht.c +++ b/src/test/check_ht.c @@ -192,7 +192,7 @@ int main(int UNUSED argc, char ** UNUSED argv) printf("Success!\n"); - pair4 testk4 = { .x = 0, .y = 0, .z = 0, .w = 1 }; + pair4 testk4 = { .x = 0, .y = 0, .z = 0, .u = 1 }; if (ht_find(htp, &testk4) == NULL) { fleprintf0("Fail to find zero pair\n"); @@ -206,7 +206,7 @@ int main(int UNUSED argc, char ** UNUSED argv) testk4.x = 1; testk4.y = 2; testk4.z = -1; - testk4.w = 2; + testk4.u = 2; if (ht_find(htp, &testk4) == NULL) { fleprintf0("Fail to find one two minus one pair\n"); @@ -220,7 +220,7 @@ int main(int UNUSED argc, char ** UNUSED argv) testk4.x = 1; testk4.y = 2; testk4.z = 1; - testk4.w = 2; + testk4.u = 2; if (ht_find(htp, &testk4)) { fleprintf0("Accidentally find one two one two pair\n"); -- cgit v1.2.3-18-g5258