blob: c4095994520ccc34e4d1140573cb4e91b51712e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#pragma once
#include <stdarg.h>
#include <msgpack.h>
#define check_return(err, expr) \
__extension__({ \
__typeof__(expr) _r = (expr); \
if (_r < 0) \
return err | (__LINE__ << 16); \
_r; \
})
#define propagate(expr) \
do { \
__typeof__(expr) _r = (expr); \
if (_r != E_OK) \
return _r; \
} while (0)
char const *type_name(msgpack_object_type type);
// Statically allocated "asprintf".
char const *ssprintf(char const *fmt, ...);
int msgpack_pack_string(msgpack_packer *pk, char const *str);
int msgpack_pack_stringf(msgpack_packer *pk, char const *fmt, ...);
int msgpack_pack_vstringf(msgpack_packer *pk, char const *fmt, va_list ap);
|