Refined examples.

This commit is contained in:
Takatoshi Kondo
2015-04-02 18:24:19 +09:00
parent a2c8154960
commit 35483b95ae
2 changed files with 12 additions and 7 deletions

View File

@@ -33,7 +33,7 @@ void unpack(char const* buf, size_t len) {
msgpack_object obj = result.data;
/* Use obj. */
printf("Object no %d:\n", i++);
printf("Object no %d:\n", ++i);
msgpack_object_print(stdout, obj);
printf("\n");
/* If you want to allocate something on the zone, you can use zone. */
@@ -72,4 +72,5 @@ Object no 2:
"second"
Object no 3:
[42, false]
All msgpack_object in the buffer is consumed.
*/