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

Function OpenModule

library/LuaApi.cpp:1305–1313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1303 ************************/
1304
1305static void OpenModule(lua_State *state, const char *mname,
1306 const LuaWrapper::FunctionReg *reg, const luaL_Reg *reg2 = NULL)
1307{
1308 luaL_getsubtable(state, lua_gettop(state), mname);
1309 LuaWrapper::SetFunctionWrappers(state, reg);
1310 if (reg2)
1311 luaL_setfuncs(state, reg2, 0);
1312 lua_pop(state, 1);
1313}
1314
1315static void OpenModule(lua_State *state, const char *mname, const luaL_Reg *reg2)
1316{

Callers 1

OpenDFHackApiFunction · 0.85

Calls 3

luaL_getsubtableFunction · 0.85
lua_gettopFunction · 0.85
luaL_setfuncsFunction · 0.85

Tested by

no test coverage detected