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

Function lpb_type

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

Source from the content-addressed store, hash-verified

1167{ lua_createtable(L, 0, t->field_count - t->oneof_field + t->oneof_count*2); }
1168
1169LUALIB_API const pb_Type *lpb_type(lpb_State *LS, pb_Slice s) {
1170 const pb_Type *t;
1171 if (s.p == NULL || *s.p == '.')
1172 t = pb_type(lpbS_state(LS), lpb_name(LS, s));
1173 else {
1174 pb_Buffer b;
1175 pb_initbuffer(&b);
1176 *pb_prepbuffsize(&b, 1) = '.';
1177 pb_addsize(&b, 1);
1178 pb_addslice(&b, s);
1179 t = pb_type(lpbS_state(LS), pb_name(lpbS_state(LS),pb_result(&b),NULL));
1180 pb_resetbuffer(&b);
1181 }
1182 return t;
1183}
1184
1185static const pb_Field *lpb_field(lua_State *L, int idx, const pb_Type *t) {
1186 lpb_State *LS = lpb_lstate(L);

Callers 14

Lpb_typesiterFunction · 0.85
Lpb_fieldsiterFunction · 0.85
Lpb_typeFunction · 0.85
Lpb_fieldFunction · 0.85
Lpb_enumFunction · 0.85
Lpb_defaultsFunction · 0.85
Lpb_hookFunction · 0.85
Lpb_encode_hookFunction · 0.85
Lpb_clearFunction · 0.85
Lpb_typefmtFunction · 0.85
Lpb_encodeFunction · 0.85
Lpb_packFunction · 0.85

Calls 7

pb_typeFunction · 0.85
pb_initbufferFunction · 0.85
pb_prepbuffsizeFunction · 0.85
pb_addsliceFunction · 0.85
pb_nameFunction · 0.85
pb_resultFunction · 0.85
pb_resetbufferFunction · 0.85

Tested by

no test coverage detected