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

Method SetFunctionWrappers

library/LuaTypes.cpp:1308–1314  ·  view source on GitHub ↗

* Wrap functions and add them to the table on the top of the stack. */

Source from the content-addressed store, hash-verified

1306 * Wrap functions and add them to the table on the top of the stack.
1307 */
1308void LuaWrapper::SetFunctionWrappers(lua_State *state, const FunctionReg *reg)
1309{
1310 int base = lua_gettop(state);
1311
1312 for (; reg && reg->name; ++reg)
1313 AddMethodWrapper(state, 0, base, reg->name, reg->identity);
1314}
1315
1316/**
1317 * Add fields in the array to the UPVAL_FIELDTABLE candidates on the stack.

Callers

nothing calls this directly

Calls 2

lua_gettopFunction · 0.85
AddMethodWrapperFunction · 0.85

Tested by

no test coverage detected