mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-28 15:14:11 +02:00
parent
08a42a347c
commit
4bc64de0ec
@ -100,6 +100,7 @@ int main(void) {
|
||||
msgpack_object_print(stdout, obj); /*=> ["Hello", "MessagePack"] */
|
||||
|
||||
/* cleaning */
|
||||
msgpack_unpacked_destroy(&msg);
|
||||
msgpack_sbuffer_free(buffer);
|
||||
msgpack_packer_free(pk);
|
||||
}
|
||||
@ -139,6 +140,7 @@ int main(void) {
|
||||
/* prints the deserialized object. */
|
||||
msgpack_object obj = msg.data;
|
||||
msgpack_object_print(stdout, obj); /*=> ["Hello", "MessagePack"] */
|
||||
msgpack_unpacked_destroy(&msg);
|
||||
puts("");
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@ void test()
|
||||
while (msgpack_unpack_next(&msg, buf.data, buf.size, &upk_pos) == MSGPACK_UNPACK_SUCCESS) {
|
||||
}
|
||||
|
||||
msgpack_unpacked_destroy(&msg);
|
||||
msgpack_sbuffer_destroy(&buf);
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ void test()
|
||||
|
||||
while (msgpack_unpack_next(&msg, buf.data, buf.size, &upk_pos) == MSGPACK_UNPACK_SUCCESS) {
|
||||
}
|
||||
|
||||
msgpack_unpacked_destroy(&msg);
|
||||
msgpack_sbuffer_destroy(&buf);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user