mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-17 11:05:05 +02:00
integrate machine-dependent integer serialization routine to msgpack/pack_template.h
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@90 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
This commit is contained in:
4
c/pack.c
4
c/pack.c
@@ -16,12 +16,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include "msgpack/pack.h"
|
||||
#include "msgpack/pack_define.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#define msgpack_pack_inline_func(name) \
|
||||
void msgpack_pack_##name
|
||||
|
||||
#define msgpack_pack_inline_func_cint(name) \
|
||||
void msgpack_pack_##name
|
||||
|
||||
#define msgpack_pack_user msgpack_pack_t*
|
||||
|
||||
#define msgpack_pack_append_buffer(user, buf, len) \
|
||||
|
6
c/pack.h
6
c/pack.h
@@ -41,6 +41,7 @@ void msgpack_pack_int(msgpack_pack_t* ctx, int d);
|
||||
void msgpack_pack_unsigned_int(msgpack_pack_t* ctx, unsigned int d);
|
||||
void msgpack_pack_long(msgpack_pack_t* ctx, long d);
|
||||
void msgpack_pack_unsigned_long(msgpack_pack_t* ctx, unsigned long d);
|
||||
|
||||
void msgpack_pack_uint8(msgpack_pack_t* ctx, uint8_t d);
|
||||
void msgpack_pack_uint16(msgpack_pack_t* ctx, uint16_t d);
|
||||
void msgpack_pack_uint32(msgpack_pack_t* ctx, uint32_t d);
|
||||
@@ -49,13 +50,18 @@ void msgpack_pack_int8(msgpack_pack_t* ctx, int8_t d);
|
||||
void msgpack_pack_int16(msgpack_pack_t* ctx, int16_t d);
|
||||
void msgpack_pack_int32(msgpack_pack_t* ctx, int32_t d);
|
||||
void msgpack_pack_int64(msgpack_pack_t* ctx, int64_t d);
|
||||
|
||||
void msgpack_pack_float(msgpack_pack_t* ctx, float d);
|
||||
void msgpack_pack_double(msgpack_pack_t* ctx, double d);
|
||||
|
||||
void msgpack_pack_nil(msgpack_pack_t* ctx);
|
||||
void msgpack_pack_true(msgpack_pack_t* ctx);
|
||||
void msgpack_pack_false(msgpack_pack_t* ctx);
|
||||
|
||||
void msgpack_pack_array(msgpack_pack_t* ctx, unsigned int n);
|
||||
|
||||
void msgpack_pack_map(msgpack_pack_t* ctx, unsigned int n);
|
||||
|
||||
void msgpack_pack_raw(msgpack_pack_t* ctx, size_t l);
|
||||
void msgpack_pack_raw_body(msgpack_pack_t* ctx, const void* b, size_t l);
|
||||
|
||||
|
Reference in New Issue
Block a user