diff options
| author | frsyuki (none) <frsyuki@vcore.> | 2009-02-26 01:15:14 +0900 |
|---|---|---|
| committer | frsyuki (none) <frsyuki@vcore.> | 2009-02-26 01:15:14 +0900 |
| commit | 65ef9cab66c39914da1292fb886c4c93c0a7312e (patch) | |
| tree | 9168b29e6d8c495001bf18573a5f712ff158c9b4 /cpp/unpack.hpp | |
| parent | 6ffee9e54abc54e84a2c81450bb1f607f0637a72 (diff) | |
| download | msgpack-python-65ef9cab66c39914da1292fb886c4c93c0a7312e.tar.gz | |
remove msgpack_unpacker_buffered_size, add msgpack_unpacker_parsed_size
Diffstat (limited to 'cpp/unpack.hpp')
| -rw-r--r-- | cpp/unpack.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cpp/unpack.hpp b/cpp/unpack.hpp index 6e9b641..0b7fe57 100644 --- a/cpp/unpack.hpp +++ b/cpp/unpack.hpp @@ -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() { |
