Kouhei Sutou
null+****@clear*****
Mon Mar 30 21:09:23 JST 2015
Kouhei Sutou 2015-03-30 21:09:23 +0900 (Mon, 30 Mar 2015) New Revision: a6b65beca50893214f3452a356983e337e14a3eb https://github.com/groonga/groonga/commit/a6b65beca50893214f3452a356983e337e14a3eb Message: Follow msgpack_packer_write_callback signature change It's a part of MessagePack 1.0.1 support. GitHub: fix #328 Reported by Hiroshi Hatake. Thanks!!! Modified files: lib/ctx.c lib/grn_ctx_impl.h lib/output.c Modified: lib/ctx.c (+0 -5) =================================================================== --- lib/ctx.c 2015-03-30 21:07:53 +0900 (5b87c8c) +++ lib/ctx.c 2015-03-30 21:09:23 +0900 (9f583ca) @@ -470,11 +470,6 @@ grn_ctx_loader_clear(grn_ctx *ctx) #define IMPL_SIZE ((sizeof(struct _grn_ctx_impl) + (grn_pagesize - 1)) & ~(grn_pagesize - 1)) #ifdef GRN_WITH_MESSAGE_PACK -# if MSGPACK_VERSION_MAJOR < 1 -typedef unsigned int msgpack_size_t; -# else /* MSGPACK_VERSION_MAJOR < 1 */ -typedef size_t msgpack_size_t; -# endif /* MSGPACK_VERSION_MAJOR < 1 */ static int grn_msgpack_buffer_write(void *data, const char *buf, msgpack_size_t len) { Modified: lib/grn_ctx_impl.h (+3 -0) =================================================================== --- lib/grn_ctx_impl.h 2015-03-30 21:07:53 +0900 (87d7bbf) +++ lib/grn_ctx_impl.h 2015-03-30 21:09:23 +0900 (14d6efc) @@ -29,9 +29,12 @@ #ifdef GRN_WITH_MESSAGE_PACK # include <msgpack.h> # if MSGPACK_VERSION_MAJOR < 1 +typedef unsigned int msgpack_size_t; # define msgpack_pack_str(packer, size) msgpack_pack_raw(packer, size) # define msgpack_pack_str_body(packer, value, size) \ msgpack_pack_raw_body(packer, value, size) +# else /* MSGPACK_VERSION_MAJOR < 1 */ +typedef size_t msgpack_size_t; # endif /* MSGPACK_VERSION_MAJOR < 1 */ #endif /* GRN_WITH_MESSAGE_PACK */ Modified: lib/output.c (+1 -1) =================================================================== --- lib/output.c 2015-03-30 21:07:53 +0900 (41f5c10) +++ lib/output.c 2015-03-30 21:09:23 +0900 (0036e9a) @@ -1846,7 +1846,7 @@ typedef struct { } msgpack_writer_ctx; static inline int -msgpack_buffer_writer(void* data, const char* buf, unsigned int len) +msgpack_buffer_writer(void* data, const char* buf, msgpack_size_t len) { msgpack_writer_ctx *writer_ctx = (msgpack_writer_ctx *)data; return grn_bulk_write(writer_ctx->ctx, writer_ctx->buffer, buf, len); -------------- next part -------------- HTML����������������������������... 下载