summaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:58 +0000
committerfrsyuki <frsyuki@5a5092ae-2292-43ba-b2d5-dcab9c1a2731>2009-02-15 09:09:58 +0000
commit1ad04b22d8d3e5267ceec7fc1527651ee0eb0ffe (patch)
tree32306ccc1f374c72440de881b928df9e945bd99f /c
parent921b0ff62ec99e9339d6cfaa6ba724ae7bb5f9ce (diff)
downloadmsgpack-python-1ad04b22d8d3e5267ceec7fc1527651ee0eb0ffe.tar.gz
lang/c/msgpack: divide pack_raw() into pack_raw() and pack_raw_body()
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@74 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
Diffstat (limited to 'c')
-rw-r--r--c/bench.c3
-rw-r--r--c/pack.h4
2 files changed, 4 insertions, 3 deletions
diff --git a/c/bench.c b/c/bench.c
index fa717c0..d72a10d 100644
--- a/c/bench.c
+++ b/c/bench.c
@@ -279,7 +279,8 @@ void bench_msgpack(void)
unsigned int i;
msgpack_pack_array(mpk, TASK_STR_LEN);
for(i=0; i < TASK_STR_LEN; ++i) {
- msgpack_pack_raw(mpk, TASK_STR_PTR, i);
+ msgpack_pack_raw(mpk, i);
+ msgpack_pack_raw_body(mpk, TASK_STR_PTR, i);
}
}
show_timer(mpkbuf.length);
diff --git a/c/pack.h b/c/pack.h
index c6cadf4..ec0683e 100644
--- a/c/pack.h
+++ b/c/pack.h
@@ -54,8 +54,8 @@ 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_string(msgpack_pack_t* ctx, const char* b);
-void msgpack_pack_raw(msgpack_pack_t* ctx, const void* b, size_t l);
+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);
#ifdef __cplusplus