summaryrefslogtreecommitdiff
path: root/cpp/unpack.hpp
diff options
context:
space:
mode:
authorfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:58 +0000
committerfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:58 +0000
commit2c7f0b2b1aa78b28916c40171dc8fee07d414d64 (patch)
tree72d454819507c5600bee624161e9fe8254803de0 /cpp/unpack.hpp
parentf4a6d7faa18eba7fad3e72c8238b0c7463c4294f (diff)
downloadmsgpack-python-2c7f0b2b1aa78b28916c40171dc8fee07d414d64.tar.gz
lang/c/msgpack: C++ binding: reexamined global operators
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@72 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
Diffstat (limited to 'cpp/unpack.hpp')
-rw-r--r--cpp/unpack.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/unpack.hpp b/cpp/unpack.hpp
index 07c52e7..de613a4 100644
--- a/cpp/unpack.hpp
+++ b/cpp/unpack.hpp
@@ -124,6 +124,10 @@ public:
// Note that reset() leaves non-parsed buffer.
void remove_nonparsed_buffer();
+ /*! skip specified size of non-parsed buffer, leaving the buffer */
+ // Note the size must be smaller than nonparsed_size()
+ void skip_nonparsed_buffer(size_t len);
+
private:
char* m_buffer;
size_t m_used;
@@ -177,6 +181,9 @@ inline size_t unpacker::parsed_size() const
inline void unpacker::remove_nonparsed_buffer()
{ m_used = m_off; }
+inline void unpacker::skip_nonparsed_buffer(size_t len)
+ { m_off += len; }
+
inline object unpack(const char* data, size_t len, zone& z, size_t* off = NULL)
{