renamed cosmoV_pushObj->cosmoV_pushRef & cosmoV_newObj->cosmoV_newRef

This commit is contained in:
2021-02-07 14:05:53 -06:00
parent 8d37f1f243
commit 0d344f65df
7 changed files with 56 additions and 55 deletions

View File

@@ -52,7 +52,7 @@ typedef union CValue {
#define cosmoV_newNumber(x) ((CValue){.num = x})
#define cosmoV_newBoolean(x) ((CValue){.data = MAKE_PAYLOAD(x) | BOOL_SIG})
#define cosmoV_newObj(x) ((CValue){.data = MAKE_PAYLOAD((uintptr_t)x) | OBJ_SIG})
#define cosmoV_newRef(x) ((CValue){.data = MAKE_PAYLOAD((uintptr_t)x) | OBJ_SIG})
#define cosmoV_newNil() ((CValue){.data = NIL_SIG})
#define cosmoV_readNumber(x) ((x).num)
@@ -83,7 +83,7 @@ typedef struct CValue {
#define cosmoV_newNumber(x) ((CValue){COSMO_TNUMBER, {.num = (x)}})
#define cosmoV_newBoolean(x) ((CValue){COSMO_TBOOLEAN, {.b = (x)}})
#define cosmoV_newObj(x) ((CValue){COSMO_TOBJ, {.obj = (CObj*)(x)}})
#define cosmoV_newRef(x) ((CValue){COSMO_TOBJ, {.obj = (CObj*)(x)}})
#define cosmoV_newNil() ((CValue){COSMO_TNIL, {.num = 0}})
// read CValues