12 #define msgpack_pack_string(pk, s) \
13 msgpack_pack_lstring(pk, s, s ? strlen(s) : 0)
16 #define msgpack_pack_literal(pk, s) \
17 msgpack_pack_lstring(pk, "" s, sizeof(s)-1)
23 #define msgpack_object_from_string(object, s) \
24 msgpack_object_from_lstring(object, s, s ? strlen(s) : 0)
27 #define msgpack_object_from_literal(object, s) \
28 msgpack_object_from_lstring(object, "" s, sizeof(s)-1)
size_t msgpack_object_str_fwrite(msgpack_object_str str, FILE *stream)
Write msgpack_object_str to a stream.
Definition: mpkutils.c:40
void msgpack_object_from_lstring(msgpack_object *object, const char *str, size_t len)
Create msgpack object from string (with given length).
Definition: mpkutils.c:26
int msgpack_pack_lstring(msgpack_packer *pk, const char *str, size_t len)
Pack string with a given length.
Definition: mpkutils.c:14