mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
remove msgpack_unpacker_buffered_size, add msgpack_unpacker_parsed_size
This commit is contained in:
parent
8893523776
commit
5697b9a15d
5 changed files with 26 additions and 19 deletions
|
|
@ -43,9 +43,6 @@ public:
|
|||
~unpacker();
|
||||
|
||||
public:
|
||||
/*! 0. check if the buffered size is not exceed the assumption. */
|
||||
size_t buffered_size() const;
|
||||
|
||||
/*! 1. reserve buffer. at least `size' bytes of capacity will be ready */
|
||||
void reserve_buffer(size_t size);
|
||||
|
||||
|
|
@ -70,6 +67,9 @@ public:
|
|||
/*! 5.3. after release_zone(), re-initialize unpacker */
|
||||
void reset();
|
||||
|
||||
/*! 6. check if the parsed message size doesn't exceed assumption. */
|
||||
size_t parsed_size() const;
|
||||
|
||||
|
||||
// Basic usage of the unpacker is as following:
|
||||
//
|
||||
|
|
@ -158,11 +158,6 @@ inline unpacker::~unpacker()
|
|||
}
|
||||
|
||||
|
||||
inline size_t unpacker::buffered_size() const
|
||||
{
|
||||
return msgpack_unpacker_buffered_size(this);
|
||||
}
|
||||
|
||||
inline void unpacker::reserve_buffer(size_t size)
|
||||
{
|
||||
if(!msgpack_unpacker_reserve_buffer(this, size)) {
|
||||
|
|
@ -223,6 +218,11 @@ inline void unpacker::reset()
|
|||
msgpack_unpacker_reset(this);
|
||||
}
|
||||
|
||||
inline size_t unpacker::parsed_size() const
|
||||
{
|
||||
return msgpack_unpacker_parsed_size(this);
|
||||
}
|
||||
|
||||
|
||||
inline char* unpacker::nonparsed_buffer()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue