[Groonga-commit] groonga/groonga at 3c90d6c [master] Fix wrong flag name

Back to archive index

Kouhei Sutou null+****@clear*****
Mon May 14 14:36:37 JST 2018


Kouhei Sutou	2018-05-14 14:36:37 +0900 (Mon, 14 May 2018)

  New Revision: 3c90d6cf987586a70bce52edd0a23b1b3ddd17ad
  https://github.com/groonga/groonga/commit/3c90d6cf987586a70bce52edd0a23b1b3ddd17ad

  Message:
    Fix wrong flag name
    
    We should use GRN_OBJ_XXX for grn_table_create().

  Modified files:
    lib/db.c
    lib/expr.c
    lib/proc.c
    lib/proc/proc_select.c

  Modified: lib/db.c (+7 -7)
===================================================================
--- lib/db.c    2018-05-14 14:12:22 +0900 (2ef5f5203)
+++ lib/db.c    2018-05-14 14:36:37 +0900 (136758822)
@@ -1389,7 +1389,7 @@ grn_table_create_for_group(grn_ctx *ctx, const char *name,
     key_type = grn_ctx_at(ctx, grn_obj_get_range(ctx, group_key));
     if (key_type) {
       res = grn_table_create_with_max_n_subrecs(ctx, name, name_size, path,
-                                                GRN_TABLE_HASH_KEY|
+                                                GRN_OBJ_TABLE_HASH_KEY|
                                                 GRN_OBJ_WITH_SUBREC|
                                                 GRN_OBJ_UNIT_USERDEF_DOCUMENT,
                                                 key_type, value_type,
@@ -1398,7 +1398,7 @@ grn_table_create_for_group(grn_ctx *ctx, const char *name,
     }
   } else {
     res = grn_table_create_with_max_n_subrecs(ctx, name, name_size, path,
-                                              GRN_TABLE_HASH_KEY|
+                                              GRN_OBJ_TABLE_HASH_KEY|
                                               GRN_OBJ_KEY_VAR_SIZE|
                                               GRN_OBJ_WITH_SUBREC|
                                               GRN_OBJ_UNIT_USERDEF_DOCUMENT,
@@ -3290,7 +3290,7 @@ grn_accessor_resolve_one_index_column(grn_ctx *ctx, grn_accessor *accessor,
     grn_rc rc;
     grn_obj *next_res_domain = grn_ctx_at(ctx, next_res_domain_id);
     *next_res = grn_table_create(ctx, NULL, 0, NULL,
-                                 GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                                 GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
                                  next_res_domain, NULL);
     rc = ctx->rc;
     grn_obj_unlink(ctx, next_res_domain);
@@ -3361,7 +3361,7 @@ grn_accessor_resolve_one_table(grn_ctx *ctx, grn_accessor *accessor,
 
   table = accessor->obj;
   *next_res = grn_table_create(ctx, NULL, 0, NULL,
-                               GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                               GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
                                table, NULL);
   if (!*next_res) {
     return ctx->rc;
@@ -3471,7 +3471,7 @@ grn_accessor_resolve_one_data_column(grn_ctx *ctx, grn_accessor *accessor,
     grn_rc rc;
     grn_obj *next_res_domain = grn_ctx_at(ctx, next_res_domain_id);
     *next_res = grn_table_create(ctx, NULL, 0, NULL,
-                                 GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                                 GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
                                  next_res_domain, NULL);
     rc = ctx->rc;
     grn_obj_unlink(ctx, next_res_domain);
@@ -3644,7 +3644,7 @@ grn_obj_search_accessor(grn_ctx *ctx, grn_obj *obj, grn_obj *query,
       grn_obj *base_res;
       grn_obj *range = grn_ctx_at(ctx, DB_OBJ(index)->range);
       base_res = grn_table_create(ctx, NULL, 0, NULL,
-                                  GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                                  GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
                                   range,
                                   NULL);
       rc = ctx->rc;
@@ -4540,7 +4540,7 @@ grn_table_group(grn_ctx *ctx, grn_obj *table,
         grn_obj *key_type = NULL;
         uint32_t additional_value_size;
 
-        flags = GRN_TABLE_HASH_KEY|
+        flags = GRN_OBJ_TABLE_HASH_KEY|
           GRN_OBJ_WITH_SUBREC|
           GRN_OBJ_UNIT_USERDEF_DOCUMENT;
         if (group_by_all_records) {

  Modified: lib/expr.c (+7 -5)
===================================================================
--- lib/expr.c    2018-05-14 14:12:22 +0900 (31aa512de)
+++ lib/expr.c    2018-05-14 14:36:37 +0900 (f38285467)
@@ -6522,7 +6522,7 @@ grn_table_select_index_call_selector(grn_ctx *ctx,
             base_index = index_data.index;
           }
           base_res = grn_table_create(ctx, NULL, 0, NULL,
-                                      GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                                      GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
                                       base_table, NULL);
         }
       }
@@ -6822,7 +6822,7 @@ grn_table_select_index_range_accessor(grn_ctx *ctx,
       index = last_obj;
       range = last_obj;
       base_res = grn_table_create(ctx, NULL, 0, NULL,
-                                  GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                                  GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
                                   range,
                                   NULL);
       if (!base_res) {
@@ -6840,7 +6840,7 @@ grn_table_select_index_range_accessor(grn_ctx *ctx,
 
       range = grn_ctx_at(ctx, DB_OBJ(index)->range);
       base_res = grn_table_create(ctx, NULL, 0, NULL,
-                                  GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                                  GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
                                   range,
                                   NULL);
       if (!base_res) {
@@ -7154,7 +7154,8 @@ grn_table_select(grn_ctx *ctx, grn_obj *table, grn_obj *expr,
     }
   } else {
     if (!(res = grn_table_create(ctx, NULL, 0, NULL,
-                                 GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC, table, NULL))) {
+                                 GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                                 table, NULL))) {
       return NULL;
     }
     res_created = GRN_TRUE;
@@ -7194,7 +7195,8 @@ grn_table_select(grn_ctx *ctx, grn_obj *table, grn_obj *expr,
           if (si->flags & SCAN_PUSH) {
             grn_obj *res_ = NULL;
             res_ = grn_table_create(ctx, NULL, 0, NULL,
-                                    GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC, table, NULL);
+                                    GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                                    table, NULL);
             if (!res_) {
               break;
             }

  Modified: lib/proc.c (+4 -4)
===================================================================
--- lib/proc.c    2018-05-14 14:12:22 +0900 (870c98b2a)
+++ lib/proc.c    2018-05-14 14:36:37 +0900 (edae76eb1)
@@ -1767,7 +1767,7 @@ selector_to_function_data_init(grn_ctx *ctx,
   }
 
   data->records = grn_table_create(ctx, NULL, 0, NULL,
-                                   GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                                   GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
                                    data->table, NULL);
   if (!data->records) {
     return GRN_FALSE;
@@ -2165,7 +2165,7 @@ run_sub_filter(grn_ctx *ctx, grn_obj *table,
     grn_obj *base_res = NULL;
 
     base_res = grn_table_create(ctx, NULL, 0, NULL,
-                                GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                                GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
                                 scope_domain, NULL);
     grn_table_select(ctx, scope_domain, sub_filter, base_res, GRN_OP_OR);
     if (scope->header.type == GRN_ACCESSOR) {
@@ -3224,7 +3224,7 @@ proc_range_filter(grn_ctx *ctx, int nargs, grn_obj **args,
   }
 
   res = grn_table_create(ctx, NULL, 0, NULL,
-                         GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                         GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
                          table, NULL);
   if (!res) {
     ERR(GRN_INVALID_ARGUMENT,
@@ -3779,7 +3779,7 @@ selector_prefix_rk_search(grn_ctx *ctx,
           base_table = a->obj;
         }
         base_res = grn_table_create(ctx, NULL, 0, NULL,
-                                    GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                                    GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
                                     base_table, NULL);
       }
     }

  Modified: lib/proc/proc_select.c (+1 -1)
===================================================================
--- lib/proc/proc_select.c    2018-05-14 14:12:22 +0900 (6cc2def5a)
+++ lib/proc/proc_select.c    2018-05-14 14:36:37 +0900 (22461bf90)
@@ -1301,7 +1301,7 @@ grn_select_create_all_selected_result_table(grn_ctx *ctx,
   grn_posting posting;
 
   result = grn_table_create(ctx, NULL, 0, NULL,
-                            GRN_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
+                            GRN_OBJ_TABLE_HASH_KEY|GRN_OBJ_WITH_SUBREC,
                             table, NULL);
   if (!result) {
     return NULL;
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180514/87cef8f1/attachment-0001.htm 



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