From 97bc0441b1204b3eb38f9cfc03f90e5ee675ab9a Mon Sep 17 00:00:00 2001 From: frsyuki Date: Sun, 15 Feb 2009 09:09:56 +0000 Subject: lang/c/msgpack: C++ binding: enlarged chunk size of zone git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@58 5a5092ae-2292-43ba-b2d5-dcab9c1a2731 --- cpp/unpack.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpp/unpack.cpp') diff --git a/cpp/unpack.cpp b/cpp/unpack.cpp index 807ded9..6a6a4e8 100644 --- a/cpp/unpack.cpp +++ b/cpp/unpack.cpp @@ -78,7 +78,7 @@ void unpacker::expand_buffer(size_t len) if(m_off == 0) { size_t next_size; if(m_free != 0) { next_size = m_free * 2; } - else { next_size = MSGPACK_UNPACKER_INITIAL_BUFFER_SIZE; } + else { next_size = UNPACKER_INITIAL_BUFFER_SIZE; } while(next_size < len + m_used) { next_size *= 2; } // FIXME realloc? @@ -91,7 +91,7 @@ void unpacker::expand_buffer(size_t len) m_free = next_size - m_used; } else { - size_t next_size = MSGPACK_UNPACKER_INITIAL_BUFFER_SIZE; + size_t next_size = UNPACKER_INITIAL_BUFFER_SIZE; while(next_size < len + m_used - m_off) { next_size *= 2; } void* tmp = malloc(next_size); -- cgit v1.2.1