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