[Groonga-commit] groonga/groonga at 3a32e1c [master] Add GRN_SELECT_INTERNAL_VAR_CONDITION_LEN for consistency

Zurück zum Archiv-Index

Kouhei Sutou null+****@clear*****
Thu Mar 16 14:44:50 JST 2017


Kouhei Sutou	2017-03-16 14:44:50 +0900 (Thu, 16 Mar 2017)

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

  Message:
    Add GRN_SELECT_INTERNAL_VAR_CONDITION_LEN for consistency

  Modified files:
    lib/grn_proc.h
    lib/proc/proc_select.c

  Modified: lib/grn_proc.h (+2 -0)
===================================================================
--- lib/grn_proc.h    2017-03-16 14:12:03 +0900 (b846e08)
+++ lib/grn_proc.h    2017-03-16 14:44:50 +0900 (302fea4)
@@ -28,6 +28,8 @@ extern "C" {
 #define GRN_SELECT_DEFAULT_OUTPUT_COLUMNS  "_id, _key, *"
 
 #define GRN_SELECT_INTERNAL_VAR_CONDITION     "$condition"
+#define GRN_SELECT_INTERNAL_VAR_CONDITION_LEN           \
+  (sizeof(GRN_SELECT_INTERNAL_VAR_CONDITION) - 1)
 
 void grn_proc_init_from_env(void);
 

  Modified: lib/proc/proc_select.c (+1 -1)
===================================================================
--- lib/proc/proc_select.c    2017-03-16 14:12:03 +0900 (c464b80)
+++ lib/proc/proc_select.c    2017-03-16 14:44:50 +0900 (7f91d07)
@@ -1012,7 +1012,7 @@ grn_select_expression_set_condition(grn_ctx *ctx,
   condition_ptr =
     grn_expr_get_or_add_var(ctx, expression,
                             GRN_SELECT_INTERNAL_VAR_CONDITION,
-                            strlen(GRN_SELECT_INTERNAL_VAR_CONDITION));
+                            GRN_SELECT_INTERNAL_VAR_CONDITION_LEN);
   GRN_PTR_INIT(condition_ptr, 0, GRN_DB_OBJECT);
   GRN_PTR_SET(ctx, condition_ptr, condition);
 }
-------------- next part --------------
HTML����������������������������...
Download 



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