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:
frsyuki
2009-02-15 09:09:58 +00:00
parent 921b0ff62e
commit 1ad04b22d8
9 changed files with 28 additions and 139 deletions

View File

@@ -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;
}