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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user