mirror of
https://github.com/CPunch/Cosmo.git
synced 2026-01-02 13:50:18 +00:00
more debug related refactoring
This commit is contained in:
@@ -33,7 +33,7 @@ CObj *cosmoO_allocateBase(CState *state, size_t sz, CObjType type)
|
||||
|
||||
obj->nextRoot = NULL;
|
||||
#ifdef GC_DEBUG
|
||||
printf("allocated %p with OBJ_TYPE %d\n", obj, type);
|
||||
printf("allocated %s %p\n", cosmoO_typeStr(obj), obj);
|
||||
#endif
|
||||
return obj;
|
||||
}
|
||||
@@ -41,9 +41,7 @@ CObj *cosmoO_allocateBase(CState *state, size_t sz, CObjType type)
|
||||
void cosmoO_free(CState *state, CObj *obj)
|
||||
{
|
||||
#ifdef GC_DEBUG
|
||||
printf("freeing %p [", obj);
|
||||
printObject(obj);
|
||||
printf("]\n");
|
||||
printf("freeing %s %p\n", cosmoO_typeStr(obj), obj);
|
||||
#endif
|
||||
switch (obj->type) {
|
||||
case COBJ_STRING: {
|
||||
|
||||
Reference in New Issue
Block a user