mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-13 22:50:19 +02: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:
@@ -28,9 +28,10 @@ public:
|
||||
}
|
||||
|
||||
try {
|
||||
std::string s;
|
||||
std::stringstream s;
|
||||
msgpack::pack(s, o);
|
||||
object ro = msgpack::unpack(s.data(), s.size(), m_zone);
|
||||
std::string str(s.str());
|
||||
object ro = msgpack::unpack(str.data(), str.size(), m_zone);
|
||||
if(ro != o) { throw std::runtime_error("NOT MATCH"); }
|
||||
} catch (std::runtime_error& e) {
|
||||
std::cout << "** REUNPACK FAILED **" << std::endl;
|
||||
|
Reference in New Issue
Block a user