]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
denc: add non-contiguous decode_nohead() for bl,string
authorKefu Chai <kchai@redhat.com>
Tue, 27 Nov 2018 02:47:07 +0000 (10:47 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 27 Nov 2018 16:33:51 +0000 (00:33 +0800)
commit8b2b83867ec049e3b8c0840d44286d38993779ee
treeb5d54aa6dfb4bad7b79636b2c0c19fb5ffbfa00f
parent1c5834be574c6bb2f9d0b44f41e50f0be050984a
denc: add non-contiguous decode_nohead() for bl,string

bufferlist's denc traits claims to be need_contiguous=false, so
it should implement all all functions to work with
buffer::list::const_iterator. we already have decode(), the missing
puzzle is decode_nohead().

in this change, decode_nohead(size_t len, bufferlist& v,
                              buffer::list::const_iterator& p) is implemented.

same applies to basic_string.

ideally, we should allow decode buffer::list::iterator as well. but
let's leave it for another change in future when it's needed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/denc.h