MCPcopy Create free account
hub / github.com/Tencent/UnLua / lpb_reftable

Function lpb_reftable

Plugins/UnLuaExtensions/LuaProtobuf/Source/src/pb.cpp:147–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145} lpb_State;
146
147static int lpb_reftable(lua_State *L, int ref) {
148 if (ref != LUA_NOREF) {
149 lua_rawgeti(L, LUA_REGISTRYINDEX, ref);
150 return ref;
151 } else {
152 lua_newtable(L);
153 lua_pushvalue(L, -1);
154 return luaL_ref(L, LUA_REGISTRYINDEX);
155 }
156}
157
158static void lpb_pushdeftable(lua_State *L, lpb_State *LS)
159{ LS->defs_index = lpb_reftable(L, LS->defs_index); }

Callers 3

lpb_pushdeftableFunction · 0.85
lpb_pushenchooktableFunction · 0.85
lpb_pushdechooktableFunction · 0.85

Calls 3

lua_rawgetiFunction · 0.85
lua_pushvalueFunction · 0.85
luaL_refFunction · 0.85

Tested by

no test coverage detected