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

Function OpenMatinfo

library/LuaApi.cpp:607–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605};
606
607static void OpenMatinfo(lua_State *state)
608{
609 luaL_getsubtable(state, lua_gettop(state), "matinfo");
610
611 lua_dup(state);
612 lua_rawsetp(state, LUA_REGISTRYINDEX, &DFHACK_MATINFO_TOKEN);
613
614 lua_dup(state);
615 luaL_setfuncs(state, dfhack_matinfo_funcs, 1);
616
617 lua_dup(state);
618 lua_setfield(state, -2, "__index");
619
620 lua_pop(state, 1);
621}
622
623/**************
624 * Pen object *

Callers 1

OpenDFHackApiFunction · 0.85

Calls 6

luaL_getsubtableFunction · 0.85
lua_gettopFunction · 0.85
lua_dupFunction · 0.85
lua_rawsetpFunction · 0.85
luaL_setfuncsFunction · 0.85
lua_setfieldFunction · 0.85

Tested by

no test coverage detected