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

Function pb_skipbytes

Plugins/UnLuaExtensions/LuaProtobuf/Source/src/pb.h:593–603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

591}
592
593PB_API size_t pb_skipbytes(pb_Slice *s) {
594 const char *p = s->p;
595 uint64_t var;
596 if (!pb_readvarint64(s, &var)) return 0;
597 if (pb_len(*s) < var) {
598 s->p = p;
599 return 0;
600 }
601 s->p += var;
602 return s->p - p;
603}
604
605PB_API size_t pb_skipslice(pb_Slice *s, size_t len) {
606 if (s->p + len > s->end) return 0;

Callers 1

pb_skipvalueFunction · 0.85

Calls 2

pb_readvarint64Function · 0.85
pb_lenFunction · 0.85

Tested by

no test coverage detected