[Groonga-commit] groonga/groonga at 5c32ea3 [master] Follow token -> token_cursor name change

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Nov 9 22:26:12 JST 2014


Kouhei Sutou	2014-11-09 22:26:12 +0900 (Sun, 09 Nov 2014)

  New Revision: 5c32ea3dad1750ab07e73c41c4f6fe82c60e7200
  https://github.com/groonga/groonga/commit/5c32ea3dad1750ab07e73c41c4f6fe82c60e7200

  Message:
    Follow token -> token_cursor name change

  Modified files:
    lib/grn_token.h
    lib/ii.c
    lib/proc.c
    lib/tokenizer.c

  Modified: lib/grn_token.h (+1 -1)
===================================================================
--- lib/grn_token.h    2014-11-09 22:22:28 +0900 (95dec9b)
+++ lib/grn_token.h    2014-11-09 22:26:12 +0900 (25af818)
@@ -57,7 +57,7 @@ typedef struct {
   grn_obj *nstr;
 } grn_token_cursor;
 
-#define GRN_TOKEN_ENABLE_TOKENIZED_DELIMITER (0x01L<<0)
+#define GRN_TOKEN_CURSOR_ENABLE_TOKENIZED_DELIMITER (0x01L<<0)
 
 GRN_API grn_token_cursor *grn_token_cursor_open(grn_ctx *ctx, grn_obj *table,
                                                 const char *str, size_t str_len,

  Modified: lib/ii.c (+2 -2)
===================================================================
--- lib/ii.c    2014-11-09 22:22:28 +0900 (acc0493)
+++ lib/ii.c    2014-11-09 22:26:12 +0900 (c6c01c9)
@@ -5362,7 +5362,7 @@ token_info_build(grn_ctx *ctx, grn_obj *lexicon, grn_ii *ii, const char *string,
   const char *key;
   uint32_t size;
   grn_rc rc = GRN_END_OF_DATA;
-  unsigned int token_flags = GRN_TOKEN_ENABLE_TOKENIZED_DELIMITER;
+  unsigned int token_flags = GRN_TOKEN_CURSOR_ENABLE_TOKENIZED_DELIMITER;
   grn_token_cursor *token_cursor = grn_token_cursor_open(ctx, lexicon,
                                                          string, string_len,
                                                          GRN_TOKEN_GET,
@@ -5656,7 +5656,7 @@ grn_ii_similar_search(grn_ctx *ctx, grn_ii *ii,
   grn_rc rc = GRN_SUCCESS;
   grn_hash *h;
   grn_token_cursor *token_cursor;
-  unsigned int token_flags = GRN_TOKEN_ENABLE_TOKENIZED_DELIMITER;
+  unsigned int token_flags = GRN_TOKEN_CURSOR_ENABLE_TOKENIZED_DELIMITER;
   grn_obj *lexicon = ii->lexicon;
   if (!lexicon || !ii || !string || !string_len || !s || !optarg) { return GRN_INVALID_ARGUMENT; }
   if (!(h = grn_hash_create(ctx, NULL, sizeof(grn_id), sizeof(int), 0))) {

  Modified: lib/proc.c (+3 -3)
===================================================================
--- lib/proc.c    2014-11-09 22:22:28 +0900 (2eae89b)
+++ lib/proc.c    2014-11-09 22:26:12 +0900 (f7f6991)
@@ -3374,16 +3374,16 @@ parse_tokenize_flags(grn_ctx *ctx, grn_obj *flag_names)
 #define CHECK_FLAG(name)\
     if (((names_end - names) >= (sizeof(#name) - 1)) &&\
         (!memcmp(names, #name, sizeof(#name) - 1))) {\
-      flags |= GRN_TOKEN_ ## name;\
+      flags |= GRN_TOKEN_CURSOR_ ## name;\
       names += sizeof(#name);\
       continue;\
     }
 
     CHECK_FLAG(ENABLE_TOKENIZED_DELIMITER);
 
-#define GRN_TOKEN_NONE 0
+#define GRN_TOKEN_CURSOR_NONE 0
     CHECK_FLAG(NONE);
-#undef GRN_TOKEN_NONE
+#undef GRN_TOKEN_CURSOR_NONE
 
     ERR(GRN_INVALID_ARGUMENT, "[tokenize] invalid flag: <%.*s>",
         (int)(names_end - names), names);

  Modified: lib/tokenizer.c (+1 -1)
===================================================================
--- lib/tokenizer.c    2014-11-09 22:22:28 +0900 (42affce)
+++ lib/tokenizer.c    2014-11-09 22:26:12 +0900 (4060faf)
@@ -176,7 +176,7 @@ grn_tokenizer_query_open(grn_ctx *ctx, int num_args, grn_obj **args,
       }
       query->encoding = table_encoding;
 
-      if (query->flags & GRN_TOKEN_ENABLE_TOKENIZED_DELIMITER) {
+      if (query->flags & GRN_TOKEN_CURSOR_ENABLE_TOKENIZED_DELIMITER) {
         const char *normalized_string;
         unsigned int normalized_string_length;
 
-------------- next part --------------
HTML����������������������������...
Download 



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