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

Function RenderTypeChildren

library/LuaWrapper.cpp:1722–1739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1720}
1721
1722static void RenderTypeChildren(lua_State *state, const std::vector<const compound_identity*> &children)
1723{
1724 // fieldtable pairstable |
1725 int base = lua_gettop(state);
1726
1727 for (size_t i = 0; i < children.size(); i++)
1728 {
1729 RenderType(state, children[i]);
1730 lua_pushstring(state, children[i]->getName());
1731 lua_swap(state);
1732
1733 // save in both tables
1734 lua_pushvalue(state, -2);
1735 lua_pushvalue(state, -2);
1736 lua_rawset(state, base);
1737 lua_rawset(state, base-1);
1738 }
1739}
1740
1741static int DoAttach(lua_State *state)
1742{

Callers 2

RenderTypeFunction · 0.85
DoAttachFunction · 0.85

Calls 8

lua_gettopFunction · 0.85
RenderTypeFunction · 0.85
lua_pushstringFunction · 0.85
lua_swapFunction · 0.85
lua_pushvalueFunction · 0.85
lua_rawsetFunction · 0.85
sizeMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected