mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 02:09:59 +00:00
ruby: fixes SEGV on MessagePack_Unpacker_each
This commit is contained in:
parent
bccac610a4
commit
354af69f62
3 changed files with 149 additions and 174 deletions
|
|
@ -28,7 +28,7 @@ To use the library in your program, include msgpack.hpp header and link msgpack
|
|||
std::vector<std::string> target;
|
||||
target.push_back("Hello,");
|
||||
target.push_back("World!");
|
||||
|
||||
|
||||
// Serialize it.
|
||||
msgpack::sbuffer buffer; // simple buffer
|
||||
msgpack::pack(&buffer, target);
|
||||
|
|
@ -38,7 +38,7 @@ To use the library in your program, include msgpack.hpp header and link msgpack
|
|||
msgpack::object obj;
|
||||
msgpack::unpack_return ret =
|
||||
msgpack::unpack(buffer.data, buffer.size, NULL, &mempool, &obj);
|
||||
|
||||
|
||||
if(ret != msgapck::UNPACK_SUCCESS) {
|
||||
// error check
|
||||
exit(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue