Kouhei Sutou
null+****@clear*****
Wed May 9 10:47:07 JST 2018
Kouhei Sutou 2018-05-09 10:47:07 +0900 (Wed, 09 May 2018) New Revision: 253f05a551f523b9e96ecbec6619b6c35a326896 https://github.com/groonga/groonga/commit/253f05a551f523b9e96ecbec6619b6c35a326896 Message: Add missing proc type check Modified files: lib/db.c Modified: lib/db.c (+4 -2) =================================================================== --- lib/db.c 2018-05-09 10:14:55 +0900 (3cfa9535a) +++ lib/db.c 2018-05-09 10:47:07 +0900 (2ef5f5203) @@ -1025,8 +1025,10 @@ grn_proc_create(grn_ctx *ctx, const char *name, int name_size, grn_proc_type typ res->funcs[PROC_NEXT] = next; res->funcs[PROC_FIN] = fin; memset(&(res->callbacks), 0, sizeof(res->callbacks)); - res->callbacks.function.selector_op = GRN_OP_NOP; - res->callbacks.function.is_stable = GRN_TRUE; + if (type == GRN_PROC_FUNCTION) { + res->callbacks.function.selector_op = GRN_OP_NOP; + res->callbacks.function.is_stable = GRN_TRUE; + } GRN_TEXT_INIT(&res->name_buf, 0); res->vars = NULL; res->nvars = 0; -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180509/18c6e3f7/attachment.htm