summaryrefslogtreecommitdiff
path: root/cpp/src/msgpack/pack.h
diff options
context:
space:
mode:
authorfrsyuki <frsyuki@users.sourceforge.jp>2010-08-27 17:42:05 +0900
committerfrsyuki <frsyuki@users.sourceforge.jp>2010-08-27 17:42:05 +0900
commitfe2a0f5089ebfc5c03db783a1f85b1c7c217128a (patch)
tree007dc7dcf1f0f60cb1a455c7640c7c16cad9ac60 /cpp/src/msgpack/pack.h
parent59ba8dec4ee082e8777047e6ae72e8b6998cdc79 (diff)
downloadmsgpack-python-fe2a0f5089ebfc5c03db783a1f85b1c7c217128a.tar.gz
cpp: adds fixed length serialization for integers
Diffstat (limited to 'cpp/src/msgpack/pack.h')
-rw-r--r--cpp/src/msgpack/pack.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/src/msgpack/pack.h b/cpp/src/msgpack/pack.h
index 9c4ce59..c156496 100644
--- a/cpp/src/msgpack/pack.h
+++ b/cpp/src/msgpack/pack.h
@@ -70,6 +70,15 @@ static int msgpack_pack_int16(msgpack_packer* pk, int16_t d);
static int msgpack_pack_int32(msgpack_packer* pk, int32_t d);
static int msgpack_pack_int64(msgpack_packer* pk, int64_t d);
+static int msgpack_pack_fix_uint8(msgpack_packer* pk, uint8_t d);
+static int msgpack_pack_fix_uint16(msgpack_packer* pk, uint16_t d);
+static int msgpack_pack_fix_uint32(msgpack_packer* pk, uint32_t d);
+static int msgpack_pack_fix_uint64(msgpack_packer* pk, uint64_t d);
+static int msgpack_pack_fix_int8(msgpack_packer* pk, int8_t d);
+static int msgpack_pack_fix_int16(msgpack_packer* pk, int16_t d);
+static int msgpack_pack_fix_int32(msgpack_packer* pk, int32_t d);
+static int msgpack_pack_fix_int64(msgpack_packer* pk, int64_t d);
+
static int msgpack_pack_float(msgpack_packer* pk, float d);
static int msgpack_pack_double(msgpack_packer* pk, double d);
@@ -99,6 +108,9 @@ int msgpack_pack_object(msgpack_packer* pk, msgpack_object d);
#define msgpack_pack_inline_func_cint(name) \
inline int msgpack_pack ## name
+#define msgpack_pack_inline_func_fixint(name) \
+ inline int msgpack_pack_fix ## name
+
#define msgpack_pack_user msgpack_packer*
#define msgpack_pack_append_buffer(user, buf, len) \