Kouhei Sutou
null+****@clear*****
Wed Mar 18 16:18:01 JST 2015
Kouhei Sutou 2015-03-18 16:18:01 +0900 (Wed, 18 Mar 2015) New Revision: 94fc726a50032f21d8e96bf532c6e4b0108b5afc https://github.com/groonga/groonga/commit/94fc726a50032f21d8e96bf532c6e4b0108b5afc Message: Add missing API_ENTER/RETURN It fixes exit code of "groonga" executable command when Groonga command is passed as argument like: "groonga /tmp/db invalid_command". Without this change, "groonga /tmp/db XXX" always returns 0 as exit code. Modified files: lib/ctx.c Modified: lib/ctx.c (+2 -1) =================================================================== --- lib/ctx.c 2015-03-18 11:47:43 +0900 (27b27e0) +++ lib/ctx.c 2015-03-18 16:18:01 +0900 (dc88e5e) @@ -1890,6 +1890,7 @@ grn_rc grn_ctx_sendv(grn_ctx *ctx, int argc, char **argv, int flags) { grn_obj buf; + GRN_API_ENTER; GRN_TEXT_INIT(&buf, 0); while (argc--) { // todo : encode into json like syntax @@ -1899,7 +1900,7 @@ grn_ctx_sendv(grn_ctx *ctx, int argc, char **argv, int flags) } grn_ctx_send(ctx, GRN_TEXT_VALUE(&buf), GRN_TEXT_LEN(&buf), flags); GRN_OBJ_FIN(ctx, &buf); - return ctx->rc; + GRN_API_RETURN(ctx->rc); } static int -------------- next part -------------- HTML����������������������������...Download