mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-14 15:05:37 +02:00
lang/c/msgpack: removed string type
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@54 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
This commit is contained in:
@@ -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);
|
||||
|
@@ -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,
|
||||
|
@@ -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 {
|
||||
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user