move generator script execution to an isolated Lua state

This commit is contained in:
MihailRis
2024-10-06 18:23:33 +03:00
parent 091805a16e
commit 73d96fd4f7
8 changed files with 101 additions and 75 deletions
+5 -1
View File
@@ -546,9 +546,13 @@ namespace lua {
return 0;
}
int create_environment(lua::State*, int parent);
void removeEnvironment(lua::State*, int id);
void remove_environment(lua::State*, int id);
void dump_stack(lua::State*);
inline void close(lua::State* L) {
lua_close(L);
}
inline void addfunc(
lua::State* L, const std::string& name, lua_CFunction func
) {