[Groonga-commit] groonga/groonga at f9ec1ca [master] Remove needless "_args"

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Feb 5 17:23:45 JST 2016


Kouhei Sutou	2016-02-05 17:23:45 +0900 (Fri, 05 Feb 2016)

  New Revision: f9ec1ca76683eb1863608e50201d255c24c4aa29
  https://github.com/groonga/groonga/commit/f9ec1ca76683eb1863608e50201d255c24c4aa29

  Message:
    Remove needless "_args"
    
    Because it's in optarg.

  Modified files:
    include/groonga/groonga.h
    lib/db.c
    lib/grn_ii.h
    lib/ii.c
    lib/proc.c

  Modified: include/groonga/groonga.h (+1 -1)
===================================================================
--- include/groonga/groonga.h    2016-02-05 17:10:05 +0900 (e629ad9)
+++ include/groonga/groonga.h    2016-02-05 17:23:45 +0900 (998a96f)
@@ -957,7 +957,7 @@ struct _grn_search_optarg {
   grn_obj *scorer;
   grn_obj *scorer_args_expr;
   unsigned int scorer_args_expr_offset;
-  grn_fuzzy_optarg *fuzzy_args;
+  grn_fuzzy_optarg *fuzzy;
 };
 
 GRN_API grn_rc grn_obj_search(grn_ctx *ctx, grn_obj *obj, grn_obj *query,

  Modified: lib/db.c (+1 -1)
===================================================================
--- lib/db.c    2016-02-05 17:10:05 +0900 (19c4823)
+++ lib/db.c    2016-02-05 17:23:45 +0900 (316838c)
@@ -3462,7 +3462,7 @@ grn_obj_search(grn_ctx *ctx, grn_obj *obj, grn_obj *query,
           }
           if (optarg && optarg->mode == GRN_OP_FUZZY) {
             rc = grn_table_fuzzy_search(ctx, obj, key, key_size,
-                                        optarg->fuzzy_args, res);
+                                        optarg->fuzzy, res);
           } else {
             rc = grn_table_search(ctx, obj, key, key_size, mode, res, op);
           }

  Modified: lib/grn_ii.h (+1 -1)
===================================================================
--- lib/grn_ii.h    2016-02-05 17:10:05 +0900 (a954a0a)
+++ lib/grn_ii.h    2016-02-05 17:23:45 +0900 (9c5c104)
@@ -143,7 +143,7 @@ struct _grn_select_optarg {
   grn_obj *scorer;
   grn_obj *scorer_args_expr;
   unsigned int scorer_args_expr_offset;
-  grn_fuzzy_optarg *fuzzy_args;
+  grn_fuzzy_optarg *fuzzy;
 };
 
 GRN_API grn_rc grn_ii_column_update(grn_ctx *ctx, grn_ii *ii, grn_id id,

  Modified: lib/ii.c (+4 -3)
===================================================================
--- lib/ii.c    2016-02-05 17:10:05 +0900 (1549966)
+++ lib/ii.c    2016-02-05 17:23:45 +0900 (5fc0eb5)
@@ -6572,7 +6572,7 @@ grn_ii_select(grn_ctx *ctx, grn_ii *ii,
     return GRN_NO_MEMORY_AVAILABLE;
   }
   if (mode == GRN_OP_FUZZY) {
-    if (token_info_build_fuzzy(ctx, lexicon, ii, string, string_len, tis, &n, &only_skip_token, mode, optarg->fuzzy_args) || !n) { goto exit; }
+    if (token_info_build_fuzzy(ctx, lexicon, ii, string, string_len, tis, &n, &only_skip_token, mode, optarg->fuzzy) || !n) { goto exit; }
   } else {
     if (token_info_build(ctx, lexicon, ii, string, string_len, tis, &n, &only_skip_token, mode) || !n) { goto exit; }
   }
@@ -6883,7 +6883,8 @@ grn_ii_estimate_size_for_query(grn_ctx *ctx, grn_ii *ii,
   switch (mode) {
   case GRN_OP_FUZZY :
     rc = token_info_build_fuzzy(ctx, lexicon, ii, query, query_len,
-                                tis, &n_tis, &only_skip_token, mode, optarg->fuzzy_args);
+                                tis, &n_tis, &only_skip_token, mode,
+                                optarg->fuzzy);
     break;
   default :
     rc = token_info_build(ctx, lexicon, ii, query, query_len,
@@ -6969,7 +6970,7 @@ grn_ii_sel(grn_ctx *ctx, grn_ii *ii, const char *string, unsigned int string_len
         break;
       case GRN_OP_FUZZY :
         arg.mode = optarg->mode;
-        arg.fuzzy_args = optarg->fuzzy_args;
+        arg.fuzzy = optarg->fuzzy;
         break;
       default :
         break;

  Modified: lib/proc.c (+1 -1)
===================================================================
--- lib/proc.c    2016-02-05 17:10:05 +0900 (cec8a6f)
+++ lib/proc.c    2016-02-05 17:23:45 +0900 (b729f34)
@@ -7140,7 +7140,7 @@ selector_fuzzy_search(grn_ctx *ctx, grn_obj *table, grn_obj *index,
     args.max_distance = max_distance;
     args.max_expansion = max_expansion;
     args.flags = flags;
-    options.fuzzy_args = &args;
+    options.fuzzy = &args;
     grn_obj_search(ctx, target, query, res, op, &options);
   }
 
-------------- next part --------------
HTML����������������������������...
Download 



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