fixed GC bug

This commit is contained in:
2020-11-17 03:10:55 -06:00
parent 204bec3d0a
commit 1329b72fcd
5 changed files with 56 additions and 9 deletions

View File

@@ -12,6 +12,7 @@ typedef struct CTableEntry {
typedef struct CTable {
int count;
int capacity;
int tombstones;
CTableEntry *table;
} CTable;
@@ -22,7 +23,7 @@ COSMO_API CValue *cosmoT_insert(CState *state, CTable *tbl, CValue key);
CObjString *cosmoT_lookupString(CTable *tbl, const char *str, size_t length, uint32_t hash);
bool cosmoT_get(CTable *tbl, CValue key, CValue *val);
bool cosmoT_remove(CTable *tbl, CValue key);
bool cosmoT_remove(CState *state, CTable *tbl, CValue key);
void cosmoT_printTable(CTable *tbl, const char *name);