[Groonga-commit] groonga/groonga [master] Use enum instead of uint8_t

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Dec 21 14:49:11 JST 2012


Kouhei Sutou	2012-12-21 14:49:11 +0900 (Fri, 21 Dec 2012)

  New Revision: 136f17394e0ac47d87d59d6e1730af5b82216417
  https://github.com/groonga/groonga/commit/136f17394e0ac47d87d59d6e1730af5b82216417

  Log:
    Use enum instead of uint8_t

  Modified files:
    lib/token.h

  Modified: lib/token.h (+7 -7)
===================================================================
--- lib/token.h    2012-12-21 14:13:25 +0900 (e700d67)
+++ lib/token.h    2012-12-21 14:49:11 +0900 (139f139)
@@ -43,6 +43,12 @@ typedef enum {
   GRN_TOKEN_DEL
 } grn_token_mode;
 
+typedef enum {
+  GRN_TOKEN_DOING = 0,
+  GRN_TOKEN_DONE,
+  GRN_TOKEN_NOT_FOUND
+} grn_token_status;
+
 typedef struct {
   grn_obj *table;
   const unsigned char *orig;
@@ -51,7 +57,7 @@ typedef struct {
   uint32_t curr_size;
   int32_t pos;
   grn_token_mode mode;
-  uint8_t status;
+  grn_token_status status;
   uint8_t force_prefix;
   grn_obj_flags table_flags;
   grn_encoding encoding;
@@ -61,12 +67,6 @@ typedef struct {
   grn_obj *nstr;
 } grn_token;
 
-typedef enum {
-  GRN_TOKEN_DOING = 0,
-  GRN_TOKEN_DONE,
-  GRN_TOKEN_NOT_FOUND
-} grn_token_status;
-
 #define GRN_TOKEN_LAST      (0x01L<<0)
 #define GRN_TOKEN_OVERLAP   (0x01L<<1)
 #define GRN_TOKEN_UNMATURED (0x01L<<2)
-------------- next part --------------
HTML����������������������������...
Download 



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