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

Function lpb_pushunpackdef

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

Source from the content-addressed store, hash-verified

1911
1912
1913void lpb_pushunpackdef(lua_State* L, lpb_State* LS, const pb_Type* t, pb_Field** l, int top) {
1914 unsigned int i;
1915 int mode = LS->encode_mode;
1916 mode = t->is_proto3 && mode == LPB_DEFDEF ? LPB_COPYDEF : mode;
1917 if (mode != LPB_COPYDEF && mode != LPB_METADEF) return;
1918
1919 for (i = 0; i < t->field_count; i++) {
1920 int idx = top + i + 1;
1921 if (lua_isnoneornil(L, idx) && lpb_pushdeffield(L, LS, l[i], t->is_proto3)) {
1922 lua_replace(L, idx);
1923 }
1924 }
1925}
1926
1927static int lpb_unpackfield(lpb_Env *e, const pb_Field* f, uint32_t tag, int last) {
1928 if (!f) {

Callers 1

lpbD_unpackFunction · 0.85

Calls 1

lpb_pushdeffieldFunction · 0.85

Tested by

no test coverage detected