Change Eluna to a global variable

Remove Eluna* from being passed. You can now get it through Eluna::GetEluna(L)
Change function call cleanup to lua_settop instead of manual loop
Explicitly delete the copy constructor and copy assignment operators
This commit is contained in:
Rochet2
2017-03-19 15:48:48 +02:00
parent 8d3433f4b5
commit b7c379a42c
23 changed files with 990 additions and 976 deletions

View File

@@ -232,6 +232,10 @@ void Eluna::OpenLua()
}
L = luaL_newstate();
lua_pushlightuserdata(L, this);
lua_setfield(L, LUA_REGISTRYINDEX, ELUNA_STATE_PTR);
CreateBindStores();
// open base lua libraries