summaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
Diffstat (limited to 'c')
-rw-r--r--c/bench.c6
-rw-r--r--c/bench_inline.c4
-rw-r--r--c/unpack.h3
-rw-r--r--c/unpack_inline.c7
4 files changed, 6 insertions, 14 deletions
diff --git a/c/bench.c b/c/bench.c
index f27350a..91f0c21 100644
--- a/c/bench.c
+++ b/c/bench.c
@@ -55,8 +55,7 @@ static void* unpack_array_start(void* data, unsigned int n) { return NULL; }
static void unpack_array_item(void* data, void* c, void* o) { }
static void* unpack_map_start(void* data, unsigned int n) { return NULL; }
static void unpack_map_item(void* data, void* c, void* k, void* v) { }
-static void* unpack_string(void* data, const void* b, size_t l) { return NULL; }
-static void* unpack_raw(void* data, const void* b, size_t l) { /*printf("unpack raw %p %lu\n",b,l);*/ return NULL; }
+static void* unpack_raw(void* data, const void* b, const void* p, size_t l) { /*printf("unpack raw %p %lu\n",p,l);*/ return NULL; }
typedef struct {
size_t allocated;
@@ -119,7 +118,7 @@ void bench_json(void)
NULL,
NULL,
reformat_number,
- reformat_string,
+ reformat_string,
reformat_start_map,
reformat_map_key,
reformat_end_map,
@@ -236,7 +235,6 @@ void bench_msgpack(void)
unpack_array_item,
unpack_map_start,
unpack_map_item,
- unpack_string,
unpack_raw,
};
msgpack_unpack_t* mupk = msgpack_unpack_new(NULL, &cb);
diff --git a/c/bench_inline.c b/c/bench_inline.c
index 2901508..5390319 100644
--- a/c/bench_inline.c
+++ b/c/bench_inline.c
@@ -65,8 +65,7 @@ static inline void* msgpack_unpack_array_start(msgpack_unpack_context* x, unsign
static inline void msgpack_unpack_array_item(msgpack_unpack_context* x, void* c, void* o) { }
static inline void* msgpack_unpack_map_start(msgpack_unpack_context* x, unsigned int n) { return NULL; }
static inline void msgpack_unpack_map_item(msgpack_unpack_context* x, void* c, void* k, void* v) { }
-static inline void* msgpack_unpack_string(msgpack_unpack_context* x, const void* b, size_t l) { return NULL; }
-static inline void* msgpack_unpack_raw(msgpack_unpack_context* x, const void* b, size_t l) { return NULL; }
+static inline void* msgpack_unpack_raw(msgpack_unpack_context* x, const void* b, const void* p, size_t l) { return NULL; }
#include "msgpack/unpack/inline_impl.h"
@@ -131,7 +130,6 @@ void bench_json(void)
NULL,
NULL,
reformat_number,
- reformat_string,
reformat_start_map,
reformat_map_key,
reformat_end_map,
diff --git a/c/unpack.h b/c/unpack.h
index 3230a0d..094328e 100644
--- a/c/unpack.h
+++ b/c/unpack.h
@@ -39,8 +39,7 @@ typedef struct {
void (*unpack_array_item)(void* data, void* c, void* o);
void* (*unpack_map_start)(void* data, unsigned int n);
void (*unpack_map_item)(void* data, void* c, void* k, void* v);
- void* (*unpack_string)(void* data, const void* b, size_t l);
- void* (*unpack_raw)(void* data, const void* b, size_t l);
+ void* (*unpack_raw)(void* data, const void* b, const void* p, size_t l);
} msgpack_unpack_callback;
typedef struct {
diff --git a/c/unpack_inline.c b/c/unpack_inline.c
index 3525468..d758d3e 100644
--- a/c/unpack_inline.c
+++ b/c/unpack_inline.c
@@ -71,11 +71,8 @@ static inline void* msgpack_unpack_map_start(msgpack_unpack_t* x, unsigned int n
static inline void msgpack_unpack_map_item(msgpack_unpack_t* x, void* c, void* k, void* v)
{ x->callback.unpack_map_item(x->data, c, k, v); }
-static inline void* msgpack_unpack_string(msgpack_unpack_t* x, const void* b, size_t l)
-{ return x->callback.unpack_string(x->data, b, l); }
-
-static inline void* msgpack_unpack_raw(msgpack_unpack_t* x, const void* b, size_t l)
-{ return x->callback.unpack_raw(x->data, b, l); }
+static inline void* msgpack_unpack_raw(msgpack_unpack_t* x, const void* b, const void* p, size_t l)
+{ return x->callback.unpack_raw(x->data, b, p, l); }
#include "msgpack/unpack/inline_impl.h"