struct lttng_msgpack_writer *writer, uint64_t value);
int lttng_msgpack_write_signed_integer(
struct lttng_msgpack_writer *writer, int64_t value);
-int lttng_msgpack_write_double(struct lttng_msgpack_writer *writer, double value);
int lttng_msgpack_write_str(struct lttng_msgpack_writer *writer,
const char *value);
int lttng_msgpack_begin_map(struct lttng_msgpack_writer *writer, size_t count);
return lttng_msgpack_append_buffer(writer, (uint8_t *) &value, sizeof(value));
}
-static inline int lttng_msgpack_append_f64(
- struct lttng_msgpack_writer *writer, double value)
-{
-
- union {
- double d;
- uint64_t u;
- } u;
-
- u.d = value;
-
- return lttng_msgpack_append_u64(writer, u.u);
-}
-
static inline int lttng_msgpack_append_i8(
struct lttng_msgpack_writer *writer, int8_t value)
{
return lttng_msgpack_append_u64(writer, (uint64_t) value);
}
-static inline int lttng_msgpack_encode_f64(
- struct lttng_msgpack_writer *writer, double value)
-{
- int ret;
-
- ret = lttng_msgpack_append_u8(writer, MSGPACK_FLOAT64_ID);
- if (ret)
- goto end;
-
- ret = lttng_msgpack_append_f64(writer, value);
- if (ret)
- goto end;
-
-end:
- return ret;
-}
-
static inline int lttng_msgpack_encode_fixmap(
struct lttng_msgpack_writer *writer, uint8_t count)
{
return ret;
}
-int lttng_msgpack_write_double(struct lttng_msgpack_writer *writer, double value)
-{
- return lttng_msgpack_encode_f64(writer, value);
-}
-
void lttng_msgpack_writer_init(struct lttng_msgpack_writer *writer,
uint8_t *buffer, size_t size)
{