[Groonga-commit] groonga/groonga at 4347167 [master] Use "expr" instead of "expression" for API

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Thu Mar 16 10:13:31 JST 2017


Kouhei Sutou	2017-03-16 10:13:31 +0900 (Thu, 16 Mar 2017)

  New Revision: 4347167bbf2a7ad3555b2159fbe7d0160bad4cab
  https://github.com/groonga/groonga/commit/4347167bbf2a7ad3555b2159fbe7d0160bad4cab

  Message:
    Use "expr" instead of "expression" for API
    
    Because we use "expr" in other codes.

  Modified files:
    include/groonga/table.h
    lib/proc/proc_select.c
    lib/table.c

  Modified: include/groonga/table.h (+4 -4)
===================================================================
--- include/groonga/table.h    2017-03-16 10:11:34 +0900 (1e335aa)
+++ include/groonga/table.h    2017-03-16 10:13:31 +0900 (5d2516f)
@@ -222,10 +222,10 @@ GRN_API grn_obj *grn_table_tokenize(grn_ctx *ctx, grn_obj *table,
                                     const char *str, unsigned int str_len,
                                     grn_obj *buf, grn_bool addp);
 
-GRN_API grn_rc grn_table_apply_expression(grn_ctx *ctx,
-                                          grn_obj *table,
-                                          grn_obj *output_column,
-                                          grn_obj *expression);
+GRN_API grn_rc grn_table_apply_expr(grn_ctx *ctx,
+                                    grn_obj *table,
+                                    grn_obj *output_column,
+                                    grn_obj *expr);
 
 #ifdef __cplusplus
 }

  Modified: lib/proc/proc_select.c (+1 -1)
===================================================================
--- lib/proc/proc_select.c    2017-03-16 10:11:34 +0900 (afc6918)
+++ lib/proc/proc_select.c    2017-03-16 10:13:31 +0900 (c464b80)
@@ -1357,7 +1357,7 @@ grn_select_apply_columns(grn_ctx *ctx,
       }
     } else {
       grn_rc rc;
-      rc = grn_table_apply_expression(ctx, table, column, expression);
+      rc = grn_table_apply_expr(ctx, table, column, expression);
       if (rc != GRN_SUCCESS) {
         grn_obj_close(ctx, expression);
         grn_obj_close(ctx, column);

  Modified: lib/table.c (+4 -4)
===================================================================
--- lib/table.c    2017-03-16 10:11:34 +0900 (a9e3c98)
+++ lib/table.c    2017-03-16 10:13:31 +0900 (f47be3d)
@@ -20,20 +20,20 @@
 #include "grn_ctx.h"
 
 grn_rc
-grn_table_apply_expression(grn_ctx *ctx,
+grn_table_apply_expr(grn_ctx *ctx,
                            grn_obj *table,
                            grn_obj *output_column,
-                           grn_obj *expression)
+                           grn_obj *expr)
 {
   grn_obj *record;
 
   GRN_API_ENTER;
 
-  record = grn_expr_get_var_by_offset(ctx, expression, 0);
+  record = grn_expr_get_var_by_offset(ctx, expr, 0);
   GRN_TABLE_EACH_BEGIN_FLAGS(ctx, table, cursor, id, GRN_CURSOR_BY_ID) {
     grn_obj *value;
     GRN_RECORD_SET(ctx, record, id);
-    value = grn_expr_exec(ctx, expression, 0);
+    value = grn_expr_exec(ctx, expr, 0);
     if (value) {
       grn_obj_set_value(ctx, output_column, id, value, GRN_OBJ_SET);
     }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Zurück zum Archiv-Index