MCPcopy Create free account
hub / github.com/apache/impala / GetLengthPrefixedSlice

Function GetLengthPrefixedSlice

be/src/kudu/util/coding.cc:122–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122const uint8_t *GetLengthPrefixedSlice(const uint8_t *p, const uint8_t *limit,
123 Slice* result) {
124 uint32_t len = 0;
125 p = GetVarint32Ptr(p, limit, &len);
126 if (p == nullptr) return nullptr;
127 if (p + len > limit) return nullptr;
128 *result = Slice(p, len);
129 return p + len;
130}
131
132bool GetLengthPrefixedSlice(Slice* input, Slice* result) {
133 uint32_t len = 0;

Callers

nothing calls this directly

Calls 6

GetVarint32PtrFunction · 0.85
GetVarint32Function · 0.85
remove_prefixMethod · 0.80
SliceClass · 0.70
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected