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

Function GetVarint32

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

Source from the content-addressed store, hash-verified

79}
80
81bool GetVarint32(Slice* input, uint32_t* value) {
82 const uint8_t *p = input->data();
83 const uint8_t *limit = p + input->size();
84 const uint8_t *q = GetVarint32Ptr(p, limit, value);
85 if (q == nullptr) {
86 return false;
87 } else {
88 *input = Slice(q, limit - q);
89 return true;
90 }
91}
92
93const uint8_t *GetVarint64Ptr(const uint8_t *p, const uint8_t *limit, uint64_t* value) {
94 uint64_t result = 0;

Callers 1

GetLengthPrefixedSliceFunction · 0.85

Calls 4

GetVarint32PtrFunction · 0.85
SliceClass · 0.70
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected