Renamed cosmoV_readObj to cosmoV_readRef to reduce ambiguity

also fixed several typos
This commit is contained in:
2021-02-07 14:00:00 -06:00
parent 5faa40bdef
commit 8d37f1f243
10 changed files with 48 additions and 48 deletions

View File

@@ -71,7 +71,7 @@ void tableRemoveWhite(CState *state, CTable *tbl) {
int cap = tbl->capacityMask + 1;
for (int i = 0; i < cap; i++) {
CTableEntry *entry = &tbl->table[i];
if (IS_OBJ(entry->key) && !(cosmoV_readObj(entry->key))->isMarked) { // if the key is a object and it's white (unmarked), remove it from the table
if (IS_OBJ(entry->key) && !(cosmoV_readRef(entry->key))->isMarked) { // if the key is a object and it's white (unmarked), remove it from the table
cosmoT_remove(state, tbl, entry->key);
}
}
@@ -175,7 +175,7 @@ void markObject(CState *state, CObj *obj) {
void markValue(CState *state, CValue val) {
if (IS_OBJ(val))
markObject(state, cosmoV_readObj(val));
markObject(state, cosmoV_readRef(val));
}
// trace our gray references