summaryrefslogtreecommitdiff
path: root/ht.h
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-06-20 17:23:01 +0100
committerubq323 <ubq323@ubq323.website>2024-06-20 17:23:01 +0100
commitb8d0ee2e105727021f9466790ec07ecbfee8dff6 (patch)
treefe151cdbd4e0ca61a491f2f2fd01afc6448bc124 /ht.h
parent60b3369ab24f9bd2a4a6d638ab1b3013ebc29814 (diff)
string interning and print statement
Diffstat (limited to 'ht.h')
-rw-r--r--ht.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/ht.h b/ht.h
index e0e6560..36a1d2a 100644
--- a/ht.h
+++ b/ht.h
@@ -17,10 +17,11 @@ typedef struct _ht {
HtEntry *d;
} Ht;
-uint32_t hash(char *s, size_t len);
+uint32_t hash_string(char *s, size_t len);
Ht ht_new();
void ht_put(State *S, Ht *h, ObjString *k, Val v);
Val ht_get(State *S, Ht *h, ObjString *k);
+ObjString *ht_findstring(State *S, Ht *h, char *s, size_t len, uint32_t hash);
#endif