[Groonga-commit] groonga/groonga at 541037e [master] TokenPatterns: make buildable again without Onigmo

Back to archive index
Kouhei Sutou null+****@clear*****
Sun May 5 06:03:59 JST 2019


Kouhei Sutou	2019-05-05 06:03:59 +0900 (Sun, 05 May 2019)

  Revision: 541037e0dfde9e648077e1a0a108920bdb1d56a5
  https://github.com/groonga/groonga/commit/541037e0dfde9e648077e1a0a108920bdb1d56a5

  Message:
    TokenPatterns: make buildable again without Onigmo
    
    GitHub: fix #951
    
    Reported by Tomohiro KATO. Thanks!!!

  Modified files:
    lib/tokenizers.c

  Modified: lib/tokenizers.c (+2 -2)
===================================================================
--- lib/tokenizers.c    2019-05-05 05:49:20 +0900 (4abd5450d)
+++ lib/tokenizers.c    2019-05-05 06:03:59 +0900 (583b0100e)
@@ -1596,7 +1596,6 @@ pattern_open_options(grn_ctx *ctx,
     name_raw.length = name_length;
 
     if (GRN_RAW_STRING_EQUAL_CSTRING(name_raw, "pattern")) {
-#ifdef GRN_SUPPORT_REGEXP
       const char *pattern;
       unsigned int pattern_length;
       grn_id domain;
@@ -1615,17 +1614,18 @@ pattern_open_options(grn_ctx *ctx,
         GRN_TEXT_PUT(ctx, &all_patterns, pattern, pattern_length);
         GRN_TEXT_PUTS(ctx, &all_patterns, ")");
       }
-#endif /* GRN_SUPPORT_REGEXP */
     }
   } GRN_OPTION_VALUES_EACH_END();
 
   if (GRN_TEXT_LEN(&all_patterns) > 0) {
+#ifdef GRN_SUPPORT_REGEXP
     options->regex = grn_onigmo_new(ctx,
                                     GRN_TEXT_VALUE(&all_patterns),
                                     GRN_TEXT_LEN(&all_patterns),
                                     GRN_ONIGMO_OPTION_DEFAULT,
                                     GRN_ONIGMO_SYNTAX_DEFAULT,
                                     "[tokenizer][pattern]");
+#endif /* GRN_SUPPORT_REGEXP */
   }
   GRN_OBJ_FIN(ctx, &all_patterns);
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190505/ded68b4f/attachment.html>


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