mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-17 03:03:24 +02:00
Fix return type in C quickstart examples
This commit is contained in:
@@ -96,7 +96,7 @@ int main(void) {
|
|||||||
/* deserializes it. */
|
/* deserializes it. */
|
||||||
msgpack_unpacked msg;
|
msgpack_unpacked msg;
|
||||||
msgpack_unpacked_init(&msg);
|
msgpack_unpacked_init(&msg);
|
||||||
bool success = msgpack_unpack_next(&msg, buffer->data, buffer->size, NULL);
|
msgpack_unpack_return ret = msgpack_unpack_next(&msg, buffer->data, buffer->size, NULL);
|
||||||
|
|
||||||
/* prints the deserialized object. */
|
/* prints the deserialized object. */
|
||||||
msgpack_object obj = msg.data;
|
msgpack_object obj = msg.data;
|
||||||
@@ -119,7 +119,7 @@ int main(void) {
|
|||||||
/* creates buffer and serializer instance. */
|
/* creates buffer and serializer instance. */
|
||||||
msgpack_sbuffer* buffer = msgpack_sbuffer_new();
|
msgpack_sbuffer* buffer = msgpack_sbuffer_new();
|
||||||
msgpack_packer* pk = msgpack_packer_new(buffer, msgpack_sbuffer_write);
|
msgpack_packer* pk = msgpack_packer_new(buffer, msgpack_sbuffer_write);
|
||||||
|
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
for(j = 0; j<23; j++) {
|
for(j = 0; j<23; j++) {
|
||||||
@@ -137,7 +137,7 @@ int main(void) {
|
|||||||
/* deserializes it. */
|
/* deserializes it. */
|
||||||
msgpack_unpacked msg;
|
msgpack_unpacked msg;
|
||||||
msgpack_unpacked_init(&msg);
|
msgpack_unpacked_init(&msg);
|
||||||
bool success = msgpack_unpack_next(&msg, buffer->data, buffer->size, NULL);
|
msgpack_unpack_return ret = msgpack_unpack_next(&msg, buffer->data, buffer->size, NULL);
|
||||||
|
|
||||||
/* prints the deserialized object. */
|
/* prints the deserialized object. */
|
||||||
msgpack_object obj = msg.data;
|
msgpack_object obj = msg.data;
|
||||||
|
Reference in New Issue
Block a user