Kouhei Sutou
null+****@clear*****
Tue Oct 9 15:38:35 JST 2012
Kouhei Sutou 2012-10-09 15:38:35 +0900 (Tue, 09 Oct 2012) New Revision: af215292621815938e0db44487558c2e6f130088 https://github.com/groonga/groonga/commit/af215292621815938e0db44487558c2e6f130088 Log: Use meaningful name dest -> expanded_term Modified files: lib/proc.c Modified: lib/proc.c (+8 -8) =================================================================== --- lib/proc.c 2012-10-09 15:37:05 +0900 (45be247) +++ lib/proc.c 2012-10-09 15:38:35 +0900 (4c1a05f) @@ -93,7 +93,7 @@ exit : static grn_rc substitute_term(grn_ctx *ctx, grn_obj *table, grn_obj *column, - const char *term, size_t term_size, grn_obj *dest) + const char *term, size_t term_size, grn_obj *expanded_term) { grn_id id; grn_rc rc = GRN_END_OF_DATA; @@ -105,22 +105,22 @@ substitute_term(grn_ctx *ctx, grn_obj *table, grn_obj *column, GRN_TEXT_INIT(&values, GRN_OBJ_VECTOR); grn_obj_get_value(ctx, column, id, &values); n = grn_vector_size(ctx, &values); - if (n > 1) { GRN_TEXT_PUTC(ctx, dest, '('); } + if (n > 1) { GRN_TEXT_PUTC(ctx, expanded_term, '('); } for (i = 0; i < n; i++) { const char *value; unsigned int length; if (i > 0) { - GRN_TEXT_PUTS(ctx, dest, " OR "); + GRN_TEXT_PUTS(ctx, expanded_term, " OR "); } - if (n > 1) { GRN_TEXT_PUTC(ctx, dest, '('); } + if (n > 1) { GRN_TEXT_PUTC(ctx, expanded_term, '('); } length = grn_vector_get_element(ctx, &values, i, &value, NULL, NULL); - GRN_TEXT_PUT(ctx, dest, value, length); - if (n > 1) { GRN_TEXT_PUTC(ctx, dest, ')'); } + GRN_TEXT_PUT(ctx, expanded_term, value, length); + if (n > 1) { GRN_TEXT_PUTC(ctx, expanded_term, ')'); } } - if (n > 1) { GRN_TEXT_PUTC(ctx, dest, ')'); } + if (n > 1) { GRN_TEXT_PUTC(ctx, expanded_term, ')'); } GRN_OBJ_FIN(ctx, &values); } else { - grn_obj_get_value(ctx, column, id, dest); + grn_obj_get_value(ctx, column, id, expanded_term); } rc = GRN_SUCCESS; } -------------- next part -------------- HTML����������������������������...Download