#ifndef _ht_h #define _ht_h typedef struct _ht Ht; #include "val.h" typedef struct { ObjString *k; Val v; } HtEntry; typedef struct _ht { size_t len; size_t cap; HtEntry *d; } Ht; 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