| 224 | LuaScript::LuaScript(lua_State *state, const char *name, const bool &global, const bool &sandbox) noexcept : state(state), name(name), sandbox(sandbox), global(global) {} |
| 225 | |
| 226 | LuaScript::~LuaScript() noexcept { |
| 227 | if(this->loaded) { |
| 228 | lua_getglobal(this->state, this->c_unload.callback_function.data()); |
| 229 | if(!lua_isnil(this->state, -1) && lua_pcall(this->state, 0, 0, 0) != LUA_OK) { |
| 230 | print_error(this->state); |
| 231 | } |
| 232 | lua_close(this->state); |
| 233 | } |
| 234 | |
| 235 | clear_custom_font_overrides(); |
| 236 | } |
| 237 | |
| 238 | LuaAmbiguousTypeArgument LuaAmbiguousTypeArgument::check_argument(LuaScript &script, int arg, bool do_lua_error) { |
| 239 | LuaAmbiguousTypeArgument argument; |
nothing calls this directly
no test coverage detected