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

Method push_function

library/PluginManager.cpp:852–859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

850}
851
852void Plugin::push_function(lua_State *state, LuaFunction *fn)
853{
854 lua_rawgetp(state, LUA_REGISTRYINDEX, &LuaWrapper::DFHACK_TYPETABLE_TOKEN);
855 lua_pushlightuserdata(state, NULL);
856 lua_pushfstring(state, "%s.%s()", name.c_str(), fn->name.c_str());
857 lua_pushlightuserdata(state, fn);
858 lua_pushcclosure(state, lua_fun_wrapper, 4);
859}
860
861PluginManager::PluginManager(Core * core) : core(core)
862{

Callers

nothing calls this directly

Calls 5

lua_rawgetpFunction · 0.85
lua_pushlightuserdataFunction · 0.85
lua_pushfstringFunction · 0.85
lua_pushcclosureFunction · 0.85
c_strMethod · 0.80

Tested by

no test coverage detected