scriptenv?
This commit is contained in:
@@ -348,6 +348,9 @@ int lua::LuaState::createEnvironment(int parent) {
|
||||
|
||||
|
||||
void lua::LuaState::removeEnvironment(int id) {
|
||||
if (id == 0) {
|
||||
return;
|
||||
}
|
||||
lua_pushnil(L);
|
||||
setglobal(envName(id));
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ static int l_gui_get_env(lua_State* L) {
|
||||
if (doc == nullptr) {
|
||||
luaL_error(L, "document '%s' not found", name);
|
||||
}
|
||||
lua_getglobal(L, lua::LuaState::envName(doc->getEnvironment()).c_str());
|
||||
lua_getglobal(L, lua::LuaState::envName(*doc->getEnvironment()).c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user