Optimize table usage in methods

This commit is contained in:
Rochet2
2017-03-19 16:27:46 +02:00
parent b7c379a42c
commit cc2037461c
8 changed files with 26 additions and 45 deletions

View File

@@ -47,7 +47,7 @@ public:
lua_pushstring(E->L, methodTable->name);
lua_pushlightuserdata(E->L, (void*)methodTable);
lua_pushcclosure(E->L, thunk, 1);
lua_settable(E->L, -3);
lua_rawset(E->L, -3);
}
lua_remove(E->L, -1);
@@ -239,7 +239,7 @@ public:
lua_pushstring(E->L, methodTable->name);
lua_pushlightuserdata(E->L, (void*)methodTable);
lua_pushcclosure(E->L, CallMethod, 1);
lua_settable(E->L, -3);
lua_rawset(E->L, -3);
}
lua_pop(E->L, 1);