Refactored cosmoO_equals

This sets up room for the '__equal' metamethod to be added

- cosmoO_equals now requires the state to be passed
- cosmoV_equals now requires the state to be passed
- cosmoT_get now requires the state to be passed
This commit is contained in:
2021-02-19 17:04:23 -06:00
parent afac75753f
commit 66d77bc54b
11 changed files with 58 additions and 37 deletions

View File

@@ -136,7 +136,7 @@ static inline bool IS_CALLABLE(CValue val) {
}
void cosmoO_free(CState *state, CObj* obj);
bool cosmoO_equal(CObj* obj1, CObj* obj2);
bool cosmoO_equal(CState *state, CObj* obj1, CObj* obj2);
// walks the protos of obj and checks for proto
bool cosmoO_isDescendant(CObj *obj, CObjObject *proto);