Replaced msgpack::unpacked with msgpack::object_handle.

msgpack::unpacked is a typedef of the msgpack::object_handle.
I recommend using msgpack::object_handle. It can be used not only
holding unpacked msgpack objects but also msgpack::objects that are
created by any types.

Replaced unpack() APIs in test codes and examples. They used to use old
APIs.
This commit is contained in:
Takatoshi Kondo
2016-03-21 15:22:50 +09:00
parent 85164687f3
commit 1bfcf55469
43 changed files with 2357 additions and 2359 deletions

View File

@@ -60,11 +60,11 @@ void test_array_of_array() {
buffer.seekg(0);
std::string str(buffer.str());
msgpack::unpacked unpacked;
std::cout << "Start unpacking...by void unpack(unpacked& result, const char* data, size_t len)" << std::endl;
msgpack::object_handle oh;
std::cout << "Start unpacking...by void unpack(object_handle& oh, const char* data, size_t len)" << std::endl;
{
boost::timer::cpu_timer timer;
msgpack::unpack(unpacked, str.data(), str.size());
msgpack::unpack(oh, str.data(), str.size());
std::string result = timer.format();
std::cout << result << std::endl;
}
@@ -73,7 +73,7 @@ void test_array_of_array() {
std::cout << "Start converting..." << std::endl;
{
boost::timer::cpu_timer timer;
unpacked.get().convert(v2);
oh.get().convert(v2);
std::string result = timer.format();
std::cout << result << std::endl;
}