summaryrefslogtreecommitdiff
path: root/cpp/unpack.cpp
diff options
context:
space:
mode:
authorfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:56 +0000
committerfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:56 +0000
commit97bc0441b1204b3eb38f9cfc03f90e5ee675ab9a (patch)
treef83049ca457011380e907d6483e435cd2babc740 /cpp/unpack.cpp
parent94cbe54cf377f16bcc18b80d8b6f81eefd50e723 (diff)
downloadmsgpack-python-97bc0441b1204b3eb38f9cfc03f90e5ee675ab9a.tar.gz
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
Diffstat (limited to 'cpp/unpack.cpp')
-rw-r--r--cpp/unpack.cpp4
1 files changed, 2 insertions, 2 deletions
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);