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

Method Make

library/LuaTools.cpp:1739–1751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1737}
1738
1739void DFHack::Lua::Event::Make(lua_State *state, void *key, Owner *owner)
1740{
1741 lua_rawgetp(state, LUA_REGISTRYINDEX, key);
1742
1743 if (lua_isnil(state, -1))
1744 {
1745 lua_pop(state, 1);
1746 New(state, owner);
1747 }
1748
1749 lua_dup(state);
1750 lua_rawsetp(state, LUA_REGISTRYINDEX, key);
1751}
1752
1753void DFHack::Lua::Notification::invoke(color_ostream &out, int nargs)
1754{

Callers

nothing calls this directly

Calls 3

lua_rawgetpFunction · 0.85
lua_dupFunction · 0.85
lua_rawsetpFunction · 0.85

Tested by

no test coverage detected