| 1407 | } |
| 1408 | |
| 1409 | StringPiece IOBuf::backing_block(size_t i) const { |
| 1410 | if (i < _ref_num()) { |
| 1411 | const BlockRef& r = _ref_at(i); |
| 1412 | return StringPiece(r.block->data + r.offset, r.length); |
| 1413 | } |
| 1414 | return StringPiece(); |
| 1415 | } |
| 1416 | |
| 1417 | bool IOBuf::equals(const butil::IOBuf& other) const { |
| 1418 | const size_t sz1 = size(); |
no outgoing calls