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

Function pb_readfixed32

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

Source from the content-addressed store, hash-verified

495}
496
497PB_API size_t pb_readfixed32(pb_Slice *s, uint32_t *pv) {
498 int i;
499 uint32_t n = 0;
500 if (s->p + 4 > s->end)
501 return 0;
502 for (i = 3; i >= 0; --i) {
503 n <<= 8;
504 n |= s->p[i] & 0xFF;
505 }
506 s->p += 4;
507 *pv = n;
508 return 4;
509}
510
511PB_API size_t pb_readfixed64(pb_Slice *s, uint64_t *pv) {
512 int i;

Callers 2

lpb_readtypeFunction · 0.85
lpb_unpackscalarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected