diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-20 17:23:01 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-20 17:23:01 +0100 |
commit | b8d0ee2e105727021f9466790ec07ecbfee8dff6 (patch) | |
tree | fe151cdbd4e0ca61a491f2f2fd01afc6448bc124 /ht.h | |
parent | 60b3369ab24f9bd2a4a6d638ab1b3013ebc29814 (diff) |
string interning and print statement
Diffstat (limited to 'ht.h')
-rw-r--r-- | ht.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |