(err *Error)
| 246 | } |
| 247 | |
| 248 | func (b *ByteBuffer) ReadLength(err *Error) int { |
| 249 | length := b.ReadVarUint32(err) |
| 250 | const maxInt32 = uint32(1<<31 - 1) |
| 251 | if intSize == 32 && length > maxInt32 { |
| 252 | if err != nil { |
| 253 | *err = DeserializationErrorf("length %d exceeds supported int range", length) |
| 254 | } |
| 255 | return 0 |
| 256 | } |
| 257 | return int(length) |
| 258 | } |
| 259 | |
| 260 | func (b *ByteBuffer) WriteUint64(value uint64) { |
| 261 | b.grow(8) |
no test coverage detected