diff options
author | frsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731> | 2009-02-15 09:09:57 +0000 |
---|---|---|
committer | frsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731> | 2009-02-15 09:09:57 +0000 |
commit | a0a798d79e5c11bae1b0b6a94b25e0dee0c19b77 (patch) | |
tree | dc97e295b067ddbc7a8e25cbd569997ac0cd2738 /cpp/test.cpp | |
parent | 4d13f614b6839ac4ca78f5526ab79e911f33ea65 (diff) | |
download | msgpack-python-a0a798d79e5c11bae1b0b6a94b25e0dee0c19b77.tar.gz |
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
Diffstat (limited to 'cpp/test.cpp')
-rw-r--r-- | cpp/test.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/test.cpp b/cpp/test.cpp index 7c91fbd..b63f9a1 100644 --- a/cpp/test.cpp +++ b/cpp/test.cpp @@ -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; |