Kouhei Sutou
null+****@clear*****
Fri Jan 22 14:39:15 JST 2016
Kouhei Sutou 2016-01-22 14:39:15 +0900 (Fri, 22 Jan 2016) New Revision: 64e6318b6735e505b99207899c40bc22d1dc6a2b https://github.com/groonga/groonga/commit/64e6318b6735e505b99207899c40bc22d1dc6a2b Message: Fix a bug that command version specified by command_version isn't reset Modified files: lib/ctx.c Modified: lib/ctx.c (+12 -0) =================================================================== --- lib/ctx.c 2016-01-22 10:12:06 +0900 (56e5fb4) +++ lib/ctx.c 2016-01-22 14:39:15 +0900 (cb52f48) @@ -1409,9 +1409,13 @@ command_proc_p(grn_obj *expr) grn_obj * grn_ctx_qe_exec_uri(grn_ctx *ctx, const char *path, uint32_t path_len) { + grn_command_version command_version; grn_obj buf, *expr, *val; grn_obj request_id; const char *p = path, *e = path + path_len, *v, *key_end, *filename_end; + + command_version = grn_ctx_get_command_version(ctx); + GRN_TEXT_INIT(&buf, 0); GRN_TEXT_INIT(&request_id, 0); p = grn_text_urldec(ctx, &buf, p, e, '?'); @@ -1492,17 +1496,22 @@ grn_ctx_qe_exec_uri(grn_ctx *ctx, const char *path, uint32_t path_len) exit : GRN_OBJ_FIN(ctx, &request_id); GRN_OBJ_FIN(ctx, &buf); + + grn_ctx_set_command_version(ctx, command_version); + return expr; } grn_obj * grn_ctx_qe_exec(grn_ctx *ctx, const char *str, uint32_t str_len) { + grn_command_version command_version; char tok_type; int offset = 0; grn_obj buf, *expr = NULL, *val = NULL; grn_obj request_id; const char *p = str, *e = str + str_len, *v; + command_version = grn_ctx_get_command_version(ctx); GRN_TEXT_INIT(&buf, 0); GRN_TEXT_INIT(&request_id, 0); p = grn_text_unesc_tok(ctx, &buf, p, e, &tok_type); @@ -1589,6 +1598,9 @@ grn_ctx_qe_exec(grn_ctx *ctx, const char *str, uint32_t str_len) exit : GRN_OBJ_FIN(ctx, &request_id); GRN_OBJ_FIN(ctx, &buf); + + grn_ctx_set_command_version(ctx, command_version); + return expr; } -------------- next part -------------- HTML����������������������������...Download