MCPcopy Create free account
hub / github.com/DFHack/dfhack / do_invoke_event

Function do_invoke_event

library/LuaTools.cpp:1637–1644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1635}
1636
1637static void do_invoke_event(lua_State *L, int argbase, int num_args, int errorfun)
1638{
1639 for (int i = 0; i < num_args; i++)
1640 lua_pushvalue(L, argbase+i);
1641
1642 if (lua_pcall(L, num_args, 0, errorfun) != LUA_OK)
1643 report_error(L, NULL, true);
1644}
1645
1646static void dfhack_event_invoke(lua_State *L, int base, bool from_c)
1647{

Callers 1

dfhack_event_invokeFunction · 0.85

Calls 2

lua_pushvalueFunction · 0.85
report_errorFunction · 0.85

Tested by

no test coverage detected