From 40618c2ff1c18815741888674cc76c8ddc486300 Mon Sep 17 00:00:00 2001 From: kartofen Date: Wed, 2 Apr 2025 01:15:23 +0300 Subject: made building better and added README, everything else is very unfinished --- msgpack.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'msgpack.h') diff --git a/msgpack.h b/msgpack.h index 8bb4514..ab3a643 100644 --- a/msgpack.h +++ b/msgpack.h @@ -62,7 +62,6 @@ union mp_int { union mp_float { float f; double d; - uint64_t u; }; struct mp_bin { @@ -70,16 +69,16 @@ struct mp_bin { size_t size; }; -struct mp_array { - msgpack_t *members; - size_t length; -}; +// struct mp_array { +// msgpack_t *members; +// size_t length; +// }; -struct mp_map { - msgpack_t *keys; - msgpack_t *members; - size_t length; -}; +// struct mp_map { +// msgpack_t *keys; +// msgpack_t *members; +// size_t length; +// }; struct mp_timestamp { // ... @@ -114,8 +113,8 @@ struct mp_timestamp { enum msgpack_type; int msgpack_read_nil (msgpack_t *pack); -int msgpack_read_int (msgpack_t *pack, union mp_int *m); int msgpack_read_bool (msgpack_t *pack, bool *m); +int msgpack_read_int (msgpack_t *pack, union mp_int *m); int msgpack_read_float (msgpack_t *pack, union mp_float *m); int msgpack_read_raw (msgpack_t *pack, struct mp_bin *m); @@ -129,8 +128,9 @@ int msgpack_read_map (msgpack_t *pack, size_t *length); // int msgpack_read_map2 (const msgpack_t *pack, struct mp_map *m); -int msgpack_write_int (msgpack_t *pack, const union mp_int *m, enum msgpack_type subtype); +int msgpack_write_nil (msgpack_t *pack); int msgpack_write_bool (msgpack_t *pack, const bool *m); +int msgpack_write_int (msgpack_t *pack, const union mp_int *m, enum msgpack_type subtype); int msgpack_write_float (msgpack_t *pack, const union mp_float *m, enum msgpack_type subtype); int msgpack_write_raw (msgpack_t *pack, const struct mp_bin *m, enum msgpack_type subtype); -- cgit v1.2.3