extended lexer, fixed table shrinking

This commit is contained in:
2020-11-25 23:34:02 -06:00
parent bb11b3b309
commit 0745fd10a9
6 changed files with 78 additions and 7 deletions

View File

@@ -18,7 +18,7 @@
#define cosmoM_growarray(state, type, buf, count, capacity) \
if (count >= capacity || buf == NULL) { \
int old = capacity; \
capacity = old *GROW_FACTOR; \
capacity = old * GROW_FACTOR; \
buf = (type*)cosmoM_reallocate(state, buf, sizeof(type) *old, sizeof(type) *capacity); \
}