[Groonga-commit] groonga/groonga at 5a59cdf [master] REGEXP returns bool instead of int32

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Mar 10 18:38:37 JST 2015


Kouhei Sutou	2015-03-10 18:38:37 +0900 (Tue, 10 Mar 2015)

  New Revision: 5a59cdfdd8af034aa242218f0a9b9c29cad4c9ea
  https://github.com/groonga/groonga/commit/5a59cdfdd8af034aa242218f0a9b9c29cad4c9ea

  Message:
    REGEXP returns bool instead of int32

  Modified files:
    lib/expr.c

  Modified: lib/expr.c (+2 -2)
===================================================================
--- lib/expr.c    2015-03-10 18:36:27 +0900 (1ac47ab)
+++ lib/expr.c    2015-03-10 18:38:37 +0900 (c77d020)
@@ -3471,8 +3471,8 @@ grn_expr_exec(grn_ctx *ctx, grn_obj *expr, int nargs)
             matched = grn_operator_exec_regexp(ctx, target, pattern);
           });
           ALLOC1(res);
-          grn_obj_reinit(ctx, res, GRN_DB_INT32, 0);
-          GRN_INT32_SET(ctx, res, matched ? 1 : 0);
+          grn_obj_reinit(ctx, res, GRN_DB_BOOL, 0);
+          GRN_BOOL_SET(ctx, res, matched);
         }
         code++;
         break;
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index