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

Function Lpb_fieldsiter

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

Source from the content-addressed store, hash-verified

1270}
1271
1272static int Lpb_fieldsiter(lua_State *L) {
1273 lpb_State *LS = lpb_lstate(L);
1274 const pb_Type *t = lpb_type(LS, lpb_checkslice(L, 1));
1275 const pb_Field *f = pb_fname(t, lpb_name(LS, lpb_toslice(L, 2)));
1276 if ((f == NULL && !lua_isnoneornil(L, 2)) || !pb_nextfield(t, &f))
1277 return 0;
1278 return lpb_pushfield(L, t, f);
1279}
1280
1281static int Lpb_fields(lua_State *L) {
1282 lua_pushcfunction(L, Lpb_fieldsiter);

Callers

nothing calls this directly

Calls 7

lpb_lstateFunction · 0.85
lpb_typeFunction · 0.85
lpb_checksliceFunction · 0.85
pb_fnameFunction · 0.85
lpb_tosliceFunction · 0.85
pb_nextfieldFunction · 0.85
lpb_pushfieldFunction · 0.85

Tested by

no test coverage detected