Kouhei Sutou
null+****@clear*****
Mon Jun 16 15:41:15 JST 2014
Kouhei Sutou 2014-06-16 15:41:15 +0900 (Mon, 16 Jun 2014) New Revision: b8b8a4350ae8de11484460282829591ecac1cd77 https://github.com/groonga/groonga/commit/b8b8a4350ae8de11484460282829591ecac1cd77 Message: Remove unused QL related variable: ctx_impl.subbuf Modified files: lib/ctx.c lib/ctx.h lib/ctx_impl.h Modified: lib/ctx.c (+1 -23) =================================================================== --- lib/ctx.c 2014-06-16 15:38:54 +0900 (00789f9) +++ lib/ctx.c 2014-06-16 15:41:15 +0900 (0137a68) @@ -495,11 +495,10 @@ grn_ctx_impl_init(grn_ctx *ctx) ctx->impl->com = NULL; ctx->impl->outbuf = grn_obj_open(ctx, GRN_BULK, 0, 0); - ctx->impl->output = NULL /* grn_ctx_concat_func */; + ctx->impl->output = NULL; ctx->impl->data.ptr = NULL; ctx->impl->tv.tv_sec = 0; ctx->impl->tv.tv_nsec = 0; - GRN_TEXT_INIT(&ctx->impl->subbuf, 0); ctx->impl->edge = NULL; grn_loader_init(&ctx->impl->loader); ctx->impl->plugin_path = NULL; @@ -653,7 +652,6 @@ grn_ctx_fin(grn_ctx *ctx) GRN_OBJ_FIN(ctx, &ctx->impl->names); GRN_OBJ_FIN(ctx, &ctx->impl->levels); rc = grn_obj_close(ctx, ctx->impl->outbuf); - rc = grn_bulk_fin(ctx, &ctx->impl->subbuf); { grn_hash **vp; grn_obj *value; @@ -1898,17 +1896,6 @@ grn_ctx_recv(grn_ctx *ctx, char **str, unsigned int *str_len, int *flags) } else { grn_obj *buf = ctx->impl->outbuf; unsigned int head = 0, tail = GRN_BULK_VSIZE(buf); - /* - unsigned int *offsets = (unsigned int *) GRN_BULK_HEAD(&ctx->impl->subbuf); - int npackets = GRN_BULK_VSIZE(&ctx->impl->subbuf) / sizeof(unsigned int); - if (npackets < ctx->impl->bufcur) { - ERR(GRN_INVALID_ARGUMENT, "invalid argument"); - goto exit; - } - head = ctx->impl->bufcur ? offsets[ctx->impl->bufcur - 1] : 0; - tail = ctx->impl->bufcur < npackets ? offsets[ctx->impl->bufcur] : GRN_BULK_VSIZE(buf); - *flags = ctx->impl->bufcur++ < npackets ? GRN_CTX_MORE : 0; - */ *str = GRN_BULK_HEAD(buf) + head; *str_len = tail - head; GRN_BULK_REWIND(ctx->impl->outbuf); @@ -1921,15 +1908,6 @@ exit : } void -grn_ctx_concat_func(grn_ctx *ctx, int flags, void *dummy) -{ - if (ctx && ctx->impl && (flags & GRN_CTX_MORE)) { - unsigned int size = GRN_BULK_VSIZE(ctx->impl->outbuf); - grn_bulk_write(ctx, &ctx->impl->subbuf, (char *) &size, sizeof(unsigned int)); - } -} - -void grn_ctx_stream_out_func(grn_ctx *ctx, int flags, void *stream) { if (ctx && ctx->impl) { Modified: lib/ctx.h (+1 -2) =================================================================== --- lib/ctx.h 2014-06-16 15:38:54 +0900 (88b2748) +++ lib/ctx.h 2014-06-16 15:41:15 +0900 (3960560) @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2 -*- */ /* - Copyright(C) 2009-2013 Brazil + Copyright(C) 2009-2014 Brazil This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -496,7 +496,6 @@ void grn_cache_get_statistics(grn_ctx *ctx, grn_cache *cache, /**** receive handler ****/ -void grn_ctx_concat_func(grn_ctx *ctx, int flags, void *dummy); GRN_API void grn_ctx_stream_out_func(grn_ctx *c, int flags, void *stream); grn_rc grn_db_init_builtin_procs(grn_ctx *ctx); Modified: lib/ctx_impl.h (+0 -1) =================================================================== --- lib/ctx_impl.h 2014-06-16 15:38:54 +0900 (609f1f7) +++ lib/ctx_impl.h 2014-06-16 15:41:15 +0900 (6079e6a) @@ -159,7 +159,6 @@ struct _grn_ctx_impl { grn_array *values; /* temporary objects */ grn_hash *ios; /* IOs */ grn_obj *outbuf; - grn_obj subbuf; unsigned int bufcur; void (*output)(grn_ctx *, int, void *); grn_com *com; -------------- next part -------------- HTML����������������������������... 下载