[Groonga-commit] groonga/groonga at 4d6b086 [master] sub_filter: use grn_expr_get_var() intead of grn->impl->curr_expr

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Jun 21 17:20:10 JST 2013


Kouhei Sutou	2013-06-21 17:20:10 +0900 (Fri, 21 Jun 2013)

  New Revision: 4d6b086d43aa5c56ab8864b510ababab4138d4da
  https://github.com/groonga/groonga/commit/4d6b086d43aa5c56ab8864b510ababab4138d4da

  Message:
    sub_filter: use grn_expr_get_var() intead of grn->impl->curr_expr
    
    There are no tests for this case because this case isn't used with the
    current query executor. We should add a test for this case after we
    get a better query executor.

  Modified files:
    lib/proc.c

  Modified: lib/proc.c (+1 -10)
===================================================================
--- lib/proc.c    2013-06-21 17:14:36 +0900 (dc896c7)
+++ lib/proc.c    2013-06-21 17:20:10 +0900 (c3e7622)
@@ -3943,8 +3943,6 @@ static grn_obj *
 func_sub_filter(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
 {
   grn_obj *found;
-  grn_obj *command = ctx->impl->curr_expr;
-  grn_obj *condition_ptr = NULL;
   grn_obj *condition = NULL;
   grn_obj *variable;
   grn_obj *table = NULL;
@@ -3956,14 +3954,7 @@ func_sub_filter(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_dat
   }
   GRN_BOOL_SET(ctx, found, GRN_FALSE);
 
-  condition_ptr = grn_expr_get_var(ctx, command,
-                                   GRN_SELECT_INTERNAL_VAR_CONDITION,
-                                   strlen(GRN_SELECT_INTERNAL_VAR_CONDITION));
-  if (!condition_ptr) {
-    goto exit;
-  }
-
-  condition = GRN_PTR_VALUE(condition_ptr);
+  grn_proc_get_info(ctx, user_data, NULL, NULL, &condition);
   if (!condition) {
     goto exit;
   }
-------------- next part --------------
HTML����������������������������...
Download 



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