| 172 | } |
| 173 | |
| 174 | inline bool ScannerContext::Stream::ReadZLong(int64_t* value, Status* status) { |
| 175 | uint8_t* bytes; |
| 176 | int64_t bytes_len; |
| 177 | RETURN_IF_FALSE( |
| 178 | GetBytes(ReadWriteUtil::MAX_ZLONG_LEN, &bytes, &bytes_len, status, true)); |
| 179 | |
| 180 | uint8_t* new_bytes = bytes; |
| 181 | ReadWriteUtil::ZLongResult r = ReadWriteUtil::ReadZLong(&new_bytes, bytes + bytes_len); |
| 182 | if (UNLIKELY(!r.ok)) { |
| 183 | *status = ReportInvalidInt(); |
| 184 | return false; |
| 185 | } |
| 186 | *value = r.val; |
| 187 | int64_t bytes_read = new_bytes - bytes; |
| 188 | RETURN_IF_FALSE(SkipBytes(bytes_read, status)); |
| 189 | return true; |
| 190 | } |
| 191 | |
| 192 | inline void ScannerContext::Stream::AdvanceBufferPos(int64_t bytes, |
| 193 | uint8_t** buffer_pos, int64_t* buffer_bytes_left) { |
no outgoing calls
no test coverage detected