mirror of
https://github.com/CPunch/Cosmo.git
synced 2025-09-27 22:00:08 +00:00
Added object.* library; added cosmoO_isDescendant to cobj.[ch]
The object library includes: - __proto getter and setter tables (might make an option to lock __proto in the future) - ischild() cosmoB_loadDebug was renamed to cosmoB_loadVM and now only loads the VM library
This commit is contained in:
@@ -155,6 +155,9 @@ static inline CObjObject *cosmoO_grabProto(CObj *obj) {
|
||||
return obj->type == COBJ_OBJECT ? (CObjObject*)obj : obj->proto;
|
||||
}
|
||||
|
||||
// walks the protos of obj and checks for proto
|
||||
bool cosmoO_isDescendant(CObj *obj, CObjObject *proto);
|
||||
|
||||
bool cosmoO_getRawObject(CState *state, CObjObject *proto, CValue key, CValue *val, CObj *obj);
|
||||
void cosmoO_setRawObject(CState *state, CObjObject *proto, CValue key, CValue val, CObj *obj);
|
||||
bool cosmoO_indexObject(CState *state, CObjObject *object, CValue key, CValue *val);
|
||||
|
Reference in New Issue
Block a user