mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
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
This commit is contained in:
parent
f4a6d7faa1
commit
2c7f0b2b1a
10 changed files with 241 additions and 209 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue