/*static*/ LuaState* LuaState::Create(bool initStandardLibrary) { LuaState* state = LuaState::Create(); if (initStandardLibrary) state->OpenLibs(); return state; }
/*static*/ LuaState* LuaState::CreateMT(bool initStandardLibrary) { lua_Alloc reallocFunc; void* data; lua_getdefaultallocfunction(&reallocFunc, &data); LuaState* state = (LuaState*)(*reallocFunc)(data, NULL, 0, sizeof(LuaState), "LuaState", 0); ::new(state) LuaState(true); state->OpenLibs(); return state; }