mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-14 06:55:50 +02:00
lang/c/msgpack: divide pack_raw() into pack_raw() and pack_raw_body()
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@74 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
This commit is contained in:
@@ -82,7 +82,8 @@ inline std::string& operator>> (object o, std::string& v)
|
||||
template <typename Stream>
|
||||
inline packer<Stream>& operator<< (packer<Stream>& o, const type::raw_ref& v)
|
||||
{
|
||||
o.pack_raw(v.ptr, v.size);
|
||||
o.pack_raw(v.size);
|
||||
o.pack_raw_body(v.ptr, v.size);
|
||||
return o;
|
||||
}
|
||||
|
||||
@@ -90,7 +91,8 @@ inline packer<Stream>& operator<< (packer<Stream>& o, const type::raw_ref& v)
|
||||
template <typename Stream>
|
||||
inline packer<Stream>& operator<< (packer<Stream>& o, const std::string& v)
|
||||
{
|
||||
o.pack_raw(v.data(), v.size());
|
||||
o.pack_raw(v.size());
|
||||
o.pack_raw_body(v.data(), v.size());
|
||||
return o;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user