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

Method SaveInTable

library/LuaWrapper.cpp:142–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void LuaWrapper::SaveInTable(lua_State *state, void *node, LuaToken *tname)
143{
144 // stack: [info]
145 lua_rawgetp(state, LUA_REGISTRYINDEX, tname);
146
147 lua_pushvalue(state, -2);
148 lua_rawsetp(state, -2, node);
149
150 lua_pushvalue(state, -2);
151 lua_pushlightuserdata(state, node);
152 lua_rawset(state, -3);
153
154 lua_pop(state, 1);
155 // stack: [info]
156}
157
158void LuaWrapper::SaveTypeInfo(lua_State *state, void *node)
159{

Callers

nothing calls this directly

Calls 5

lua_rawgetpFunction · 0.85
lua_pushvalueFunction · 0.85
lua_rawsetpFunction · 0.85
lua_pushlightuserdataFunction · 0.85
lua_rawsetFunction · 0.85

Tested by

no test coverage detected