mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
lang/c/msgpack: C++ binding: changed calback function of packer from Stream& append(const char*, size_t) to SomeType write(SomePointerType, SomeSizeType)
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@62 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
This commit is contained in:
parent
4d13f614b6
commit
a0a798d79e
5 changed files with 47 additions and 30 deletions
|
|
@ -49,14 +49,13 @@ public:
|
|||
}
|
||||
|
||||
public:
|
||||
inline simple_buffer& append(const char* buf, size_t len)
|
||||
inline void write(const void* buf, size_t len)
|
||||
{
|
||||
if(m_allocated - m_used < len) {
|
||||
expand_buffer(len);
|
||||
}
|
||||
memcpy(m_storage + m_used, buf, len);
|
||||
m_used += len;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void clear()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue