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

Function lpb_encode_onefield

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

Source from the content-addressed store, hash-verified

1633}
1634
1635static void lpb_encode_onefield(lpb_Env *e, const pb_Type *t, const pb_Field *f, int idx) {
1636 if (f->type && f->type->is_map)
1637 lpbE_map(e, f, idx);
1638 else if (f->repeated)
1639 lpbE_repeated(e, f, idx);
1640 else if (!f->type || !f->type->is_dead)
1641 lpbE_tagfield(e, f, t->is_proto3 && !f->oneof_idx, idx);
1642}
1643
1644static void lpbE_encode(lpb_Env *e, const pb_Type *t, int idx) {
1645 lua_State *L = e->L;

Callers 2

lpbE_encodeFunction · 0.85
lpbE_packFunction · 0.85

Calls 3

lpbE_mapFunction · 0.85
lpbE_repeatedFunction · 0.85
lpbE_tagfieldFunction · 0.85

Tested by

no test coverage detected