mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
c++ binding: improve msgpack::zone, zero-copy stream deserializer
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@92 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
This commit is contained in:
parent
c93d45371b
commit
e582fa34c7
6 changed files with 336 additions and 189 deletions
|
|
@ -24,7 +24,8 @@
|
|||
#include <stdexcept>
|
||||
|
||||
#ifndef MSGPACK_UNPACKER_DEFAULT_INITIAL_BUFFER_SIZE
|
||||
#define MSGPACK_UNPACKER_DEFAULT_INITIAL_BUFFER_SIZE 8*1024
|
||||
#define MSGPACK_UNPACKER_DEFAULT_INITIAL_BUFFER_SIZE 16
|
||||
//#define MSGPACK_UNPACKER_DEFAULT_INITIAL_BUFFER_SIZE 8*1024
|
||||
#endif
|
||||
|
||||
namespace msgpack {
|
||||
|
|
@ -133,10 +134,9 @@ private:
|
|||
|
||||
std::auto_ptr<zone> m_zone;
|
||||
|
||||
struct context;
|
||||
context* m_ctx;
|
||||
void* m_ctx;
|
||||
|
||||
const size_t m_initial_buffer_size;
|
||||
size_t m_initial_buffer_size;
|
||||
|
||||
private:
|
||||
void expand_buffer(size_t len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue