minor refactoring, added inc and dec operators

This commit is contained in:
2020-11-19 14:41:21 -06:00
parent 3727d6bb7c
commit 46b99ab390
12 changed files with 248 additions and 47 deletions

View File

@@ -36,13 +36,16 @@
#define cosmoM_unfreezeGC(state) \
state->freezeGC--; \
printf("unfreezing state at %s:%d [%d]\n", __FILE__, __LINE__, state->freezeGC)
printf("unfreezing state at %s:%d [%d]\n", __FILE__, __LINE__, state->freezeGC); \
cosmoM_checkGarbage(state, 0)
#else
#define cosmoM_freezeGC(state) \
state->freezeGC++
#define cosmoM_unfreezeGC(state) \
state->freezeGC--
state->freezeGC--; \
cosmoM_checkGarbage(state, 0)
#endif
COSMO_API void *cosmoM_reallocate(CState *state, void *buf, size_t oldSize, size_t newSize);