diff options
author | Naoki INADA <inada-n@eagle> | 2009-06-29 08:23:49 +0900 |
---|---|---|
committer | Naoki INADA <inada-n@eagle> | 2009-06-29 08:23:49 +0900 |
commit | 3a6f6626ebf42aae84bfe9a7803bd8ab81185be4 (patch) | |
tree | e8cda1a2e2a7ce2b6d28fc49b9721c7ea89283a0 /msgpack/pack.h | |
parent | 9105c3513b2c35e225e4286bec582a5b4dc09f0b (diff) | |
download | msgpack-python-3a6f6626ebf42aae84bfe9a7803bd8ab81185be4.tar.gz |
Refactor packing code.
Diffstat (limited to 'msgpack/pack.h')
-rw-r--r-- | msgpack/pack.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/msgpack/pack.h b/msgpack/pack.h index 9bd6b68..cdac819 100644 --- a/msgpack/pack.h +++ b/msgpack/pack.h @@ -34,9 +34,6 @@ typedef struct msgpack_packer { static inline void msgpack_packer_init(msgpack_packer* pk, void* data, msgpack_packer_write callback); -static inline msgpack_packer* msgpack_packer_new(void* data, msgpack_packer_write callback); -static inline void msgpack_packer_free(msgpack_packer* pk); - static inline int msgpack_pack_short(msgpack_packer* pk, short d); static inline int msgpack_pack_int(msgpack_packer* pk, int d); static inline int msgpack_pack_long(msgpack_packer* pk, long d); @@ -90,20 +87,6 @@ static inline void msgpack_packer_init(msgpack_packer* pk, void* data, msgpack_p pk->callback = callback; } -static inline msgpack_packer* msgpack_packer_new(void* data, msgpack_packer_write callback) -{ - msgpack_packer* pk = (msgpack_packer*)calloc(1, sizeof(msgpack_packer)); - if(!pk) { return NULL; } - msgpack_packer_init(pk, data, callback); - return pk; -} - -static inline void msgpack_packer_free(msgpack_packer* pk) -{ - free(pk); -} - - #ifdef __cplusplus } #endif |