| 148 | const char* GetVarint32PtrFallback(const char* p, const char* limit, |
| 149 | uint32_t* value); |
| 150 | inline const char* GetVarint32Ptr(const char* p, const char* limit, |
| 151 | uint32_t* value) { |
| 152 | if (p < limit) { |
| 153 | uint32_t result = *(reinterpret_cast<const uint8_t*>(p)); |
| 154 | if ((result & 128) == 0) { |
| 155 | *value = result; |
| 156 | return p + 1; |
| 157 | } |
| 158 | } |
| 159 | return GetVarint32PtrFallback(p, limit, value); |
| 160 | } |
| 161 | |
| 162 | } // namespace leveldb |
| 163 |