added IStrings, added __index functionality

This commit is contained in:
2020-11-16 19:58:16 -06:00
parent c7be39a5d4
commit 204bec3d0a
8 changed files with 68 additions and 37 deletions

View File

@@ -191,7 +191,7 @@ COSMOVMRESULT cosmoV_call(CState *state, int args) {
CValue ret;
// check if they defined an initalizer
if (cosmoV_getObject(state, protoObj, cosmoV_newObj(state->internalStrings[INTERNALSTRING_INIT]), &ret) && IS_METHOD(ret)) {
if (cosmoV_getObject(state, protoObj, cosmoV_newObj(state->iStrings[ISTRING_INIT]), &ret) && IS_METHOD(ret)) {
callMethod(state, cosmoV_readMethod(ret), args);
cosmoV_pop(state);
} else {