MCPcopy Create free account
hub / github.com/SnowyMouse/chimera / ~LuaScript

Method ~LuaScript

src/chimera/lua/lua_script.cpp:226–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 5

lua_getglobalFunction · 0.85
print_errorFunction · 0.85
lua_closeFunction · 0.85
dataMethod · 0.80

Tested by

no test coverage detected