[Groonga-commit] groonga/groonga [master] updated to use unsigned int instead of unsigned.

Back to archive index

null+****@clear***** null+****@clear*****
2012年 1月 13日 (金) 10:12:31 JST


Susumu Yata	2012-01-13 10:12:31 +0900 (Fri, 13 Jan 2012)

  New Revision: 56aacf2499cadad922501e5ab2e4f47c5ec0ce63

  Log:
    updated to use unsigned int instead of unsigned.

  Modified files:
    examples/kv.c
    include/groonga.h
    lib/ctx.c
    lib/db.c
    lib/db.h
    lib/expr.c
    lib/ii.c
    lib/pat.c
    lib/proc.c
    lib/ql.c
    lib/scm.c
    lib/store.c
    plugins/suggest/suggest.c
    src/grntest.c

  Modified: examples/kv.c (+2 -2)
===================================================================
--- examples/kv.c    2012-01-12 18:26:55 +0900 (c998029)
+++ examples/kv.c    2012-01-13 10:12:31 +0900 (c496d29)
@@ -13,8 +13,8 @@ grn_obj *db;
 #endif /* SEQUENTIAL */
 
 int nloops = 1000000;
-unsigned key_size = 8;
-unsigned value_size = 8;
+unsigned int key_size = 8;
+unsigned int value_size = 8;
 grn_obj *value_type;
 
 #define EVAL(ctx, exp) (grn_ctx_send(ctx, (exp), strlen(exp), 0))

  Modified: include/groonga.h (+41 -40)
===================================================================
--- include/groonga.h    2012-01-12 18:26:55 +0900 (01316a0)
+++ include/groonga.h    2012-01-13 10:12:31 +0900 (9c95c36)
@@ -30,7 +30,7 @@ extern "C" {
 #endif /* defined(_WIN32) || defined(_WIN64) */
 #endif /* GRN_API */
 
-typedef unsigned grn_id;
+typedef unsigned int grn_id;
 typedef unsigned char grn_bool;
 
 #define GRN_ID_NIL                     (0x00)
@@ -550,7 +550,7 @@ GRN_API grn_obj *grn_ctx_db(grn_ctx *ctx);
  * ctxが使用するdbからnameに対応するオブジェクトを検索して返す。
  * nameに一致するオブジェクトが存在しなければNULLを返す。
  **/
-GRN_API grn_obj *grn_ctx_get(grn_ctx *ctx, const char *name, unsigned name_size);
+GRN_API grn_obj *grn_ctx_get(grn_ctx *ctx, const char *name, unsigned int name_size);
 
 /**
  * grn_ctx_at:
@@ -603,7 +603,7 @@ GRN_API grn_obj *grn_ctx_at(grn_ctx *ctx, grn_id id);
  * nameに対応する新たなtype(型)をdbに定義する。
  **/
 
-GRN_API grn_obj *grn_type_create(grn_ctx *ctx, const char *name, unsigned name_size,
+GRN_API grn_obj *grn_type_create(grn_ctx *ctx, const char *name, unsigned int name_size,
                                  grn_obj_flags flags, unsigned int size);
 
 GRN_API grn_rc grn_plugin_register(grn_ctx *ctx, const char *name);
@@ -626,7 +626,7 @@ GRN_API const char *grn_plugin_get_suffix(void);
 
 typedef struct {
   const char *name;
-  unsigned name_size;
+  unsigned int name_size;
   grn_obj value;
 } grn_expr_var;
 
@@ -640,9 +640,9 @@ typedef enum {
 } grn_proc_type;
 
 GRN_API grn_obj *grn_proc_create(grn_ctx *ctx,
-                                 const char *name, unsigned name_size, grn_proc_type type,
+                                 const char *name, unsigned int name_size, grn_proc_type type,
                                  grn_proc_func *init, grn_proc_func *next, grn_proc_func *fin,
-                                 unsigned nvars, grn_expr_var *vars);
+                                 unsigned int nvars, grn_expr_var *vars);
 /**
  * grn_proc_vars:
  * @user_data: grn_proc_funcに渡されたuser_data
@@ -653,7 +653,7 @@ GRN_API grn_obj *grn_proc_create(grn_ctx *ctx,
  **/
 
 GRN_API grn_obj *grn_proc_get_info(grn_ctx *ctx, grn_user_data *user_data,
-                                   grn_expr_var **vars, unsigned *nvars, grn_obj **caller);
+                                   grn_expr_var **vars, unsigned int *nvars, grn_obj **caller);
 
 /*-------------------------------------------------------------
  * table操作のための関数
@@ -683,7 +683,7 @@ GRN_API grn_obj *grn_proc_get_info(grn_ctx *ctx, grn_user_data *user_data,
  * nameに対応する新たなtableをctxが使用するdbに定義する。
  **/
 GRN_API grn_obj *grn_table_create(grn_ctx *ctx,
-                                  const char *name, unsigned name_size,
+                                  const char *name, unsigned int name_size,
                                   const char *path, grn_obj_flags flags,
                                   grn_obj *key_type, grn_obj *value_type);
 
@@ -704,7 +704,7 @@ GRN_API grn_obj *grn_table_create(grn_ctx *ctx,
  **/
 /* TODO: int *added -> grn_bool *added */
 GRN_API grn_id grn_table_add(grn_ctx *ctx, grn_obj *table,
-                             const void *key, unsigned key_size, int *added);
+                             const void *key, unsigned int key_size, int *added);
 
 /**
  * grn_table_get:
@@ -714,7 +714,7 @@ GRN_API grn_id grn_table_add(grn_ctx *ctx, grn_obj *table,
  * tableからkeyに対応するrecordを検索し、対応するIDを返す。
  **/
 GRN_API grn_id grn_table_get(grn_ctx *ctx, grn_obj *table,
-                             const void *key, unsigned key_size);
+                             const void *key, unsigned int key_size);
 
 
 /**
@@ -738,7 +738,7 @@ GRN_API grn_id grn_table_at(grn_ctx *ctx, grn_obj *table, grn_id id);
  * longest common prefix searchを行い、対応するIDを返す。
  **/
 GRN_API grn_id grn_table_lcp_search(grn_ctx *ctx, grn_obj *table,
-                                    const void *key, unsigned key_size);
+                                    const void *key, unsigned int key_size);
 
 /**
  * grn_table_get_key:
@@ -766,7 +766,7 @@ GRN_API int grn_table_get_key(grn_ctx *ctx, grn_obj *table,
  * 対応するレコードが存在しない場合はGRN_INVALID_ARGUMENTを返す。
  **/
 GRN_API grn_rc grn_table_delete(grn_ctx *ctx, grn_obj *table,
-                                const void *key, unsigned key_size);
+                                const void *key, unsigned int key_size);
 
 /**
  * grn_table_delete_by_id:
@@ -910,8 +910,8 @@ typedef grn_obj grn_table_cursor;
  * tableに登録されているレコードを順番に取り出すためのカーソルを生成して返す。
  **/
 GRN_API grn_table_cursor *grn_table_cursor_open(grn_ctx *ctx, grn_obj *table,
-                                                const void *min, unsigned min_size,
-                                                const void *max, unsigned max_size,
+                                                const void *min, unsigned int min_size,
+                                                const void *max, unsigned int max_size,
                                                 int offset, int limit, int flags);
 
 /**
@@ -1223,7 +1223,7 @@ GRN_API grn_rc grn_table_difference(grn_ctx *ctx, grn_obj *table1, grn_obj *tabl
  * カラムIDの数を返す。
  **/
 GRN_API int grn_table_columns(grn_ctx *ctx, grn_obj *table,
-                              const char *name, unsigned name_size,
+                              const char *name, unsigned int name_size,
                               grn_obj *res);
 
 /**
@@ -1239,7 +1239,7 @@ GRN_API int grn_table_columns(grn_ctx *ctx, grn_obj *table,
  * 例) 'col1' / 'col2.col3' / 'col2._id'
  **/
 GRN_API grn_obj *grn_obj_column(grn_ctx *ctx, grn_obj *table,
-                                const char *name, unsigned name_size);
+                                const char *name, unsigned int name_size);
 
 
 /**
@@ -1280,7 +1280,7 @@ GRN_API unsigned int grn_table_size(grn_ctx *ctx, grn_obj *table);
  * 一つのtableに同一のnameのcolumnを複数定義することはできない。
  **/
 GRN_API grn_obj *grn_column_create(grn_ctx *ctx, grn_obj *table,
-                                   const char *name, unsigned name_size,
+                                   const char *name, unsigned int name_size,
                                    const char *path, grn_obj_flags flags, grn_obj *type);
 
 #define GRN_COLUMN_OPEN_OR_CREATE(ctx,table,name,name_size,path,flags,type,column) \
@@ -1494,7 +1494,8 @@ GRN_API grn_rc grn_obj_remove(grn_ctx *ctx, grn_obj *obj);
  * ctxが使用するdbにおいてobjに対応する名前をnameに更新する。
  * objは永続オブジェクトでなければならない。
  **/
-GRN_API grn_rc grn_obj_rename(grn_ctx *ctx, grn_obj *obj, const char *name, unsigned name_size);
+GRN_API grn_rc grn_obj_rename(grn_ctx *ctx, grn_obj *obj,
+                              const char *name, unsigned int name_size);
 
 /**
  * grn_table_rename:
@@ -1507,7 +1508,7 @@ GRN_API grn_rc grn_obj_rename(grn_ctx *ctx, grn_obj *obj, const char *name, unsi
  * tableは永続オブジェクトでなければならない。
  **/
 GRN_API grn_rc grn_table_rename(grn_ctx *ctx, grn_obj *table,
-                                const char *name, unsigned name_size);
+                                const char *name, unsigned int name_size);
 
 /**
  * grn_column_rename:
@@ -1519,7 +1520,7 @@ GRN_API grn_rc grn_table_rename(grn_ctx *ctx, grn_obj *table,
  * columnは永続オブジェクトでなければならない。
  **/
 GRN_API grn_rc grn_column_rename(grn_ctx *ctx, grn_obj *column,
-                                 const char *name, unsigned name_size);
+                                 const char *name, unsigned int name_size);
 
 /**
  * grn_obj_close:
@@ -2099,8 +2100,8 @@ struct _grn_obj_format {
   grn_obj columns;
   const void *min;
   const void *max;
-  unsigned min_size;
-  unsigned max_size;
+  unsigned int min_size;
+  unsigned int max_size;
   int nhits;
   int offset;
   int limit;
@@ -2395,7 +2396,7 @@ GRN_API void grn_time_now(grn_ctx *ctx, grn_obj *obj);
   int _val = (int)(val); grn_bulk_write((ctx), (obj), (char *)&_val, sizeof(int));\
 } while (0)
 #define GRN_UINT32_PUT(ctx,obj,val) do {\
-  unsigned int _val = (unsigned  int)(val);\
+  unsigned int _val = (unsigned int)(val);\
   grn_bulk_write((ctx), (obj), (char *)&_val, sizeof(unsigned int));\
 } while (0)
 #define GRN_INT64_PUT(ctx,obj,val) do {\
@@ -2445,12 +2446,12 @@ GRN_API int grn_charlen(grn_ctx *ctx, const char *str, const char *end);
 
 /* expr */
 
-GRN_API grn_obj *grn_expr_create(grn_ctx *ctx, const char *name, unsigned name_size);
+GRN_API grn_obj *grn_expr_create(grn_ctx *ctx, const char *name, unsigned int name_size);
 GRN_API grn_rc grn_expr_close(grn_ctx *ctx, grn_obj *expr);
 GRN_API grn_obj *grn_expr_add_var(grn_ctx *ctx, grn_obj *expr,
-                                  const char *name, unsigned name_size);
+                                  const char *name, unsigned int name_size);
 GRN_API grn_obj *grn_expr_get_var(grn_ctx *ctx, grn_obj *expr,
-                                  const char *name, unsigned name_size);
+                                  const char *name, unsigned int name_size);
 GRN_API grn_obj *grn_expr_get_var_by_offset(grn_ctx *ctx, grn_obj *expr, unsigned int offset);
 
 GRN_API grn_obj *grn_expr_append_obj(grn_ctx *ctx, grn_obj *expr, grn_obj *obj,
@@ -2458,7 +2459,7 @@ GRN_API grn_obj *grn_expr_append_obj(grn_ctx *ctx, grn_obj *expr, grn_obj *obj,
 GRN_API grn_obj *grn_expr_append_const(grn_ctx *ctx, grn_obj *expr, grn_obj *obj,
                                        grn_operator op, int nargs);
 GRN_API grn_obj *grn_expr_append_const_str(grn_ctx *ctx, grn_obj *expr,
-                                           const char *str, unsigned str_size,
+                                           const char *str, unsigned int str_size,
                                            grn_operator op, int nargs);
 GRN_API grn_obj *grn_expr_append_const_int(grn_ctx *ctx, grn_obj *expr, int i,
                                            grn_operator op, int nargs);
@@ -2476,7 +2477,7 @@ GRN_API grn_obj *grn_table_select(grn_ctx *ctx, grn_obj *table, grn_obj *expr,
                                   grn_obj *res, grn_operator op);
 
 GRN_API int grn_obj_columns(grn_ctx *ctx, grn_obj *table,
-                            const char *str, unsigned str_size, grn_obj *res);
+                            const char *str, unsigned int str_size, grn_obj *res);
 
 #define GRN_EXPR_CREATE_FOR_QUERY(ctx,table,expr,var) \
   if (((expr) = grn_expr_create((ctx), NULL, 0)) &&\
@@ -2495,7 +2496,7 @@ typedef unsigned int grn_expr_flags;
 #define GRN_EXPR_ALLOW_UPDATE          (0x08)
 
 GRN_API grn_rc grn_expr_parse(grn_ctx *ctx, grn_obj *expr,
-                              const char *str, unsigned str_size,
+                              const char *str, unsigned int str_size,
                               grn_obj *default_column, grn_operator default_mode,
                               grn_operator default_op, grn_expr_flags flags);
 
@@ -2507,17 +2508,17 @@ GRN_API grn_snip *grn_expr_snip(grn_ctx *ctx, grn_obj *expr, int flags,
                                 grn_snip_mapping *mapping);
 
 GRN_API grn_table_sort_key *grn_table_sort_key_from_str(grn_ctx *ctx,
-                                                        const char *str, unsigned str_size,
-                                                        grn_obj *table, unsigned *nkeys);
+                                                        const char *str, unsigned int str_size,
+                                                        grn_obj *table, unsigned int *nkeys);
 GRN_API grn_rc grn_table_sort_key_close(grn_ctx *ctx,
-                                        grn_table_sort_key *keys, unsigned nkeys);
+                                        grn_table_sort_key *keys, unsigned int nkeys);
 
 GRN_API grn_rc grn_load(grn_ctx *ctx, grn_content_type input_type,
-                        const char *table, unsigned table_len,
-                        const char *columns, unsigned columns_len,
-                        const char *values, unsigned values_len,
-                        const char *ifexists, unsigned ifexists_len,
-                        const char *each, unsigned each_len);
+                        const char *table, unsigned int table_len,
+                        const char *columns, unsigned int columns_len,
+                        const char *values, unsigned int values_len,
+                        const char *ifexists, unsigned int ifexists_len,
+                        const char *each, unsigned int each_len);
 
 #define GRN_CTX_MORE                    (0x01<<0)
 #define GRN_CTX_TAIL                    (0x01<<1)
@@ -2526,8 +2527,8 @@ GRN_API grn_rc grn_load(grn_ctx *ctx, grn_content_type input_type,
 #define GRN_CTX_QUIT                    (0x01<<4)
 
 GRN_API grn_rc grn_ctx_connect(grn_ctx *ctx, const char *host, int port, int flags);
-GRN_API unsigned grn_ctx_send(grn_ctx *ctx, const char *str, unsigned int str_len, int flags);
-GRN_API unsigned grn_ctx_recv(grn_ctx *ctx, char **str, unsigned int *str_len, int *flags);
+GRN_API unsigned int grn_ctx_send(grn_ctx *ctx, const char *str, unsigned int str_len, int flags);
+GRN_API unsigned int grn_ctx_recv(grn_ctx *ctx, char **str, unsigned int *str_len, int *flags);
 
 typedef struct _grn_ctx_info grn_ctx_info;
 
@@ -2618,7 +2619,7 @@ typedef struct _grn_array grn_array;
 typedef struct _grn_array_cursor grn_array_cursor;
 
 GRN_API grn_array *grn_array_create(grn_ctx *ctx, const char *path,
-                                    unsigned value_size, unsigned flags);
+                                    unsigned int value_size, unsigned int flags);
 GRN_API grn_array *grn_array_open(grn_ctx *ctx, const char *path);
 GRN_API grn_rc grn_array_close(grn_ctx *ctx, grn_array *array);
 GRN_API grn_id grn_array_add(grn_ctx *ctx, grn_array *array, void **value);

  Modified: lib/ctx.c (+1 -1)
===================================================================
--- lib/ctx.c    2012-01-12 18:26:55 +0900 (8f9cf8b)
+++ lib/ctx.c    2012-01-13 10:12:31 +0900 (e10695b)
@@ -1414,7 +1414,7 @@ exit :
   GRN_API_RETURN(0);
 }
 
-unsigned
+unsigned int
 grn_ctx_recv(grn_ctx *ctx, char **str, unsigned int *str_len, int *flags)
 {
   if (!ctx) { return GRN_INVALID_ARGUMENT; }

  Modified: lib/db.c (+50 -50)
===================================================================
--- lib/db.c    2012-01-12 18:26:55 +0900 (57e3af4)
+++ lib/db.c    2012-01-13 10:12:31 +0900 (6ccaa7b)
@@ -1,5 +1,5 @@
 /* -*- c-basic-offset: 2 -*- */
-/* Copyright(C) 2009-2011 Brazil
+/* Copyright(C) 2009-2012 Brazil
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
@@ -36,7 +36,7 @@
     grn_str *nstr;\
     if ((nstr = grn_str_open(ctx, key, key_size, GRN_STR_NORMALIZE))) { \
       char *key = nstr->norm;\
-      unsigned key_size = nstr->norm_blen;\
+      unsigned int key_size = nstr->norm_blen;\
       block\
       grn_str_close(ctx, nstr);\
     }\
@@ -301,7 +301,7 @@ grn_db_close(grn_ctx *ctx, grn_obj *db)
 }
 
 grn_obj *
-grn_ctx_get(grn_ctx *ctx, const char *name, unsigned name_size)
+grn_ctx_get(grn_ctx *ctx, const char *name, unsigned int name_size)
 {
   grn_id id;
   grn_obj *obj = NULL;
@@ -438,7 +438,7 @@ grn_db_check_name(grn_ctx *ctx, const char *name, unsigned int name_size)
 #define GRN_TYPE_SIZE(type) ((type)->range)
 
 grn_obj *
-grn_type_create(grn_ctx *ctx, const char *name, unsigned name_size,
+grn_type_create(grn_ctx *ctx, const char *name, unsigned int name_size,
                 grn_obj_flags flags, unsigned int size)
 {
   grn_id id;
@@ -486,9 +486,9 @@ grn_type_open(grn_ctx *ctx, grn_obj_spec *spec)
 }
 
 grn_obj *
-grn_proc_create(grn_ctx *ctx, const char *name, unsigned name_size, grn_proc_type type,
+grn_proc_create(grn_ctx *ctx, const char *name, unsigned int name_size, grn_proc_type type,
                 grn_proc_func *init, grn_proc_func *next, grn_proc_func *fin,
-                unsigned nvars, grn_expr_var *vars)
+                unsigned int nvars, grn_expr_var *vars)
 {
   grn_proc *res = NULL;
   grn_id id = GRN_ID_NIL;
@@ -624,7 +624,7 @@ static grn_obj *grn_view_transcript(grn_ctx *ctx, const char *path, grn_obj *key
                                     grn_obj *value_type, grn_obj_flags flags);
 
 static grn_rc
-grn_table_create_validate(grn_ctx *ctx, const char *name, unsigned name_size,
+grn_table_create_validate(grn_ctx *ctx, const char *name, unsigned int name_size,
                           const char *path, grn_obj_flags flags,
                           grn_obj *key_type, grn_obj *value_type)
 {
@@ -699,7 +699,7 @@ grn_table_create_validate(grn_ctx *ctx, const char *name, unsigned name_size,
 }
 
 grn_obj *
-grn_table_create(grn_ctx *ctx, const char *name, unsigned name_size,
+grn_table_create(grn_ctx *ctx, const char *name, unsigned int name_size,
                  const char *path, grn_obj_flags flags,
                  grn_obj *key_type, grn_obj *value_type)
 {
@@ -896,7 +896,7 @@ grn_table_create(grn_ctx *ctx, const char *name, unsigned name_size,
 }
 
 grn_obj *
-grn_table_open(grn_ctx *ctx, const char *name, unsigned name_size, const char *path)
+grn_table_open(grn_ctx *ctx, const char *name, unsigned int name_size, const char *path)
 {
   grn_obj *db;
   if (!ctx->impl || !(db = ctx->impl->db)) {
@@ -947,7 +947,7 @@ grn_table_open(grn_ctx *ctx, const char *name, unsigned name_size, const char *p
 }
 
 grn_id
-grn_table_lcp_search(grn_ctx *ctx, grn_obj *table, const void *key, unsigned key_size)
+grn_table_lcp_search(grn_ctx *ctx, grn_obj *table, const void *key, unsigned int key_size)
 {
   grn_id id = GRN_ID_NIL;
   GRN_API_ENTER;
@@ -1020,7 +1020,7 @@ default_set_value_hook(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *u
 }
 
 grn_id
-grn_table_add(grn_ctx *ctx, grn_obj *table, const void *key, unsigned key_size, int *added)
+grn_table_add(grn_ctx *ctx, grn_obj *table, const void *key, unsigned int key_size, int *added)
 {
   grn_id id = GRN_ID_NIL;
   GRN_API_ENTER;
@@ -1482,7 +1482,7 @@ grn_obj_clear_value(grn_ctx *ctx, grn_obj *obj, grn_id id)
 }
 
 static void
-call_delete_hook(grn_ctx *ctx, grn_obj *table, grn_id rid, const void *key, unsigned key_size)
+call_delete_hook(grn_ctx *ctx, grn_obj *table, grn_id rid, const void *key, unsigned int key_size)
 {
   if (rid) {
     grn_hook *hooks = DB_OBJ(table)->hooks[GRN_HOOK_DELETE];
@@ -1578,7 +1578,7 @@ is_deletable(grn_ctx *ctx, grn_obj *table, grn_id id)
 }
 
 grn_rc
-grn_table_delete(grn_ctx *ctx, grn_obj *table, const void *key, unsigned key_size)
+grn_table_delete(grn_ctx *ctx, grn_obj *table, const void *key, unsigned int key_size)
 {
   grn_id rid = GRN_ID_NIL;
   grn_rc rc = GRN_INVALID_ARGUMENT;
@@ -1645,7 +1645,7 @@ _grn_table_delete_by_id(grn_ctx *ctx, grn_obj *table, grn_id id,
   grn_rc rc = GRN_INVALID_ARGUMENT;
   if (table) {
     const void *key;
-    unsigned key_size;
+    unsigned int key_size;
     if (is_deletable(ctx, table, id)) {
       if ((key = _grn_table_key(ctx, table, id, &key_size))) {
         call_delete_hook(ctx, table, id, key, key_size);
@@ -2197,8 +2197,8 @@ grn_view_cursor_close(grn_ctx *ctx, grn_view_cursor *vc)
 
 grn_table_cursor *
 grn_table_cursor_open(grn_ctx *ctx, grn_obj *table,
-                      const void *min, unsigned min_size,
-                      const void *max, unsigned max_size,
+                      const void *min, unsigned int min_size,
+                      const void *max, unsigned int max_size,
                       int offset, int limit, int flags)
 {
   grn_rc rc;
@@ -2841,7 +2841,7 @@ accelerated_table_group(grn_ctx *ctx, grn_obj *table, grn_obj *key, grn_obj *res
           {
             grn_id id;
             grn_ra *ra = (grn_ra *)a->next->obj;
-            unsigned element_size = (ra)->header->element_size;
+            unsigned int element_size = (ra)->header->element_size;
             grn_ra_cache cache;
             GRN_RA_CACHE_INIT(ra, &cache);
             while ((id = grn_table_cursor_next_inline(ctx, tc))) {
@@ -3138,12 +3138,12 @@ grn_table_difference(grn_ctx *ctx, grn_obj *table1, grn_obj *table2,
 }
 
 static grn_obj *grn_obj_get_accessor(grn_ctx *ctx, grn_obj *obj,
-                                     const char *name, unsigned name_size);
+                                     const char *name, unsigned int name_size);
 static grn_obj *grn_view_get_accessor(grn_ctx *ctx, grn_obj *obj,
-                                      const char *name, unsigned name_size);
+                                      const char *name, unsigned int name_size);
 
 static grn_obj *
-grn_obj_column_(grn_ctx *ctx, grn_obj *table, const char *name, unsigned name_size)
+grn_obj_column_(grn_ctx *ctx, grn_obj *table, const char *name, unsigned int name_size)
 {
   grn_obj *column = NULL;
   char buf[GRN_TABLE_MAX_KEY_SIZE];
@@ -3163,7 +3163,7 @@ grn_obj_column_(grn_ctx *ctx, grn_obj *table, const char *name, unsigned name_si
 }
 
 grn_obj *
-grn_obj_column(grn_ctx *ctx, grn_obj *table, const char *name, unsigned name_size)
+grn_obj_column(grn_ctx *ctx, grn_obj *table, const char *name, unsigned int name_size)
 {
   grn_obj *column = NULL;
   GRN_API_ENTER;
@@ -3183,7 +3183,7 @@ grn_obj_column(grn_ctx *ctx, grn_obj *table, const char *name, unsigned name_siz
 }
 
 int
-grn_table_columns(grn_ctx *ctx, grn_obj *table, const char *name, unsigned name_size,
+grn_table_columns(grn_ctx *ctx, grn_obj *table, const char *name, unsigned int name_size,
                   grn_obj *res)
 {
   int n = 0;
@@ -3239,7 +3239,7 @@ _grn_table_key(grn_ctx *ctx, grn_obj *table, grn_id id, uint32_t *key_size)
 
 grn_obj *
 grn_column_create(grn_ctx *ctx, grn_obj *table,
-                  const char *name, unsigned name_size,
+                  const char *name, unsigned int name_size,
                   const char *path, grn_obj_flags flags, grn_obj *type)
 {
   grn_db *s;
@@ -3428,7 +3428,7 @@ exit :
 
 grn_obj *
 grn_column_open(grn_ctx *ctx, grn_obj *table,
-                const char *name, unsigned name_size,
+                const char *name, unsigned int name_size,
                 const char *path, grn_obj *type)
 {
   grn_id domain;
@@ -3820,7 +3820,7 @@ accessor_new(grn_ctx *ctx)
 }
 
 static grn_obj *
-grn_obj_get_accessor(grn_ctx *ctx, grn_obj *obj, const char *name, unsigned name_size)
+grn_obj_get_accessor(grn_ctx *ctx, grn_obj *obj, const char *name, unsigned int name_size)
 {
   grn_accessor *res = NULL, **rp = NULL, **rp0 = NULL;
   if (!obj) { return NULL; }
@@ -4118,7 +4118,7 @@ grn_obj_get_accessor(grn_ctx *ctx, grn_obj *obj, const char *name, unsigned name
 }
 
 static grn_obj *
-grn_view_get_accessor(grn_ctx *ctx, grn_obj *obj, const char *name, unsigned name_size)
+grn_view_get_accessor(grn_ctx *ctx, grn_obj *obj, const char *name, unsigned int name_size)
 {
   int n = 0;
   grn_id *tp;
@@ -4162,7 +4162,7 @@ grn_accessor_view_close(grn_ctx *ctx, grn_obj *obj)
 }
 
 grn_obj *
-grn_table_create_for_group(grn_ctx *ctx, const char *name, unsigned name_size,
+grn_table_create_for_group(grn_ctx *ctx, const char *name, unsigned int name_size,
                            const char *path, grn_obj_flags flags,
                            grn_obj *group_key, grn_obj *value_type)
 {
@@ -5475,7 +5475,7 @@ grn_obj_get_value(grn_ctx *ctx, grn_obj *obj, grn_id id, grn_obj *value)
     break;
   case GRN_COLUMN_FIX_SIZE :
     {
-      unsigned element_size;
+      unsigned int element_size;
       void *v = grn_ra_ref(ctx, (grn_ra *)obj, id);
       value->header.type = GRN_BULK;
       value->header.domain = grn_obj_get_range(ctx, obj);
@@ -6392,7 +6392,7 @@ grn_table_update(grn_ctx *ctx, grn_obj *table,
 }
 
 grn_rc
-grn_obj_rename(grn_ctx *ctx, grn_obj *obj, const char *name, unsigned name_size)
+grn_obj_rename(grn_ctx *ctx, grn_obj *obj, const char *name, unsigned int name_size)
 {
   grn_rc rc = GRN_INVALID_ARGUMENT;
   GRN_API_ENTER;
@@ -6405,7 +6405,7 @@ grn_obj_rename(grn_ctx *ctx, grn_obj *obj, const char *name, unsigned name_size)
 }
 
 grn_rc
-grn_table_rename(grn_ctx *ctx, grn_obj *table, const char *name, unsigned name_size)
+grn_table_rename(grn_ctx *ctx, grn_obj *table, const char *name, unsigned int name_size)
 {
   grn_rc rc = GRN_INVALID_ARGUMENT;
   GRN_API_ENTER;
@@ -6441,7 +6441,7 @@ grn_table_rename(grn_ctx *ctx, grn_obj *table, const char *name, unsigned name_s
 }
 
 grn_rc
-grn_column_rename(grn_ctx *ctx, grn_obj *column, const char *name, unsigned name_size)
+grn_column_rename(grn_ctx *ctx, grn_obj *column, const char *name, unsigned int name_size)
 {
   grn_rc rc = GRN_INVALID_ARGUMENT;
   GRN_API_ENTER;
@@ -6476,7 +6476,7 @@ grn_obj_path_rename(grn_ctx *ctx, const char *old_path, const char *new_path)
 
 /* db must be validated by caller */
 grn_id
-grn_obj_register(grn_ctx *ctx, grn_obj *db, const char *name, unsigned name_size)
+grn_obj_register(grn_ctx *ctx, grn_obj *db, const char *name, unsigned int name_size)
 {
   grn_id id = GRN_ID_NIL;
   if (name && name_size) {
@@ -8143,7 +8143,7 @@ tokenize(const char *str, size_t str_len, const char **tokbuf, int buf_size, con
 // todo : support view
 grn_rc
 grn_obj_columns(grn_ctx *ctx, grn_obj *table,
-                const char *str, unsigned str_size, grn_obj *res)
+                const char *str, unsigned int str_size, grn_obj *res)
 {
   grn_obj *col;
   const char *p = (char *)str, *q, *r, *pe = p + str_size, *tokbuf[256];
@@ -8215,8 +8215,8 @@ grn_obj_columns(grn_ctx *ctx, grn_obj *table,
 }
 
 static grn_table_sort_key *
-grn_table_sort_key_from_str_geo(grn_ctx *ctx, const char *str, unsigned str_size,
-                                grn_obj *table, unsigned *nkeys)
+grn_table_sort_key_from_str_geo(grn_ctx *ctx, const char *str, unsigned int str_size,
+                                grn_obj *table, unsigned int *nkeys)
 {
   const char **tokbuf;
   const char *p = str, *pe = str + str_size;
@@ -8277,8 +8277,8 @@ grn_table_sort_key_from_str_geo(grn_ctx *ctx, const char *str, unsigned str_size
 }
 
 grn_table_sort_key *
-grn_table_sort_key_from_str(grn_ctx *ctx, const char *str, unsigned str_size,
-                            grn_obj *table, unsigned *nkeys)
+grn_table_sort_key_from_str(grn_ctx *ctx, const char *str, unsigned int str_size,
+                            grn_obj *table, unsigned int *nkeys)
 {
   const char *p = str;
   const char **tokbuf;
@@ -8333,7 +8333,7 @@ grn_table_sort_key_from_str(grn_ctx *ctx, const char *str, unsigned str_size,
 }
 
 grn_rc
-grn_table_sort_key_close(grn_ctx *ctx, grn_table_sort_key *keys, unsigned nkeys)
+grn_table_sort_key_close(grn_ctx *ctx, grn_table_sort_key *keys, unsigned int nkeys)
 {
   int i;
   if (keys) {
@@ -8486,7 +8486,7 @@ set_vector(grn_ctx *ctx, grn_obj *column, grn_id id, grn_obj *vector)
 }
 
 static inline int
-name_equal(const char *p, unsigned size, const char *name)
+name_equal(const char *p, unsigned int size, const char *name)
 {
   if (strlen(name) != size) { return 0; }
   if (*p != GRN_DB_PSEUDO_COLUMN_PREFIX) { return 0; }
@@ -8520,7 +8520,7 @@ bracket_close(grn_ctx *ctx, grn_loader *loader)
           grn_obj *key_value = NULL;
           while (ndata--) {
             char *column_name = GRN_TEXT_VALUE(value);
-            unsigned column_name_size = GRN_TEXT_LEN(value);
+            unsigned int column_name_size = GRN_TEXT_LEN(value);
             if (value->header.domain == GRN_DB_TEXT &&
                 (name_equal(column_name, column_name_size, KEY_NAME) ||
                  name_equal(column_name, column_name_size, ID_NAME))) {
@@ -8558,7 +8558,7 @@ bracket_close(grn_ctx *ctx, grn_loader *loader)
           while (ndata--) {
             if (value->header.domain == GRN_DB_TEXT) {
               char *column_name = GRN_TEXT_VALUE(value);
-              unsigned column_name_size = GRN_TEXT_LEN(value);
+              unsigned int column_name_size = GRN_TEXT_LEN(value);
               col = grn_obj_column(ctx, loader->table,
                                    column_name, column_name_size);
               if (!col) {
@@ -8642,7 +8642,7 @@ brace_close(grn_ctx *ctx, grn_loader *loader)
           grn_obj *v, *key_value = 0;
           for (v = value; v + 1 < ve; v = values_next(ctx, v)) {
             char *column_name = GRN_TEXT_VALUE(v);
-            unsigned column_name_size = GRN_TEXT_LEN(v);
+            unsigned int column_name_size = GRN_TEXT_LEN(v);
             if (v->header.domain == GRN_DB_TEXT &&
                 (name_equal(column_name, column_name_size, KEY_NAME) ||
                  name_equal(column_name, column_name_size, ID_NAME))) {
@@ -8670,7 +8670,7 @@ brace_close(grn_ctx *ctx, grn_loader *loader)
       if (id) {
         grn_obj *col;
         const char *name;
-        unsigned name_size;
+        unsigned int name_size;
         while (value + 1 < ve) {
           if (value->header.domain != GRN_DB_TEXT) { break; /* error */ }
           name = GRN_TEXT_VALUE(value);
@@ -8736,7 +8736,7 @@ brace_close(grn_ctx *ctx, grn_loader *loader)
 }\
 
 static void
-json_read(grn_ctx *ctx, grn_loader *loader, const char *str, unsigned str_len)
+json_read(grn_ctx *ctx, grn_loader *loader, const char *str, unsigned int str_len)
 {
   const char *const beg = str;
   char c;
@@ -9047,7 +9047,7 @@ json_read(grn_ctx *ctx, grn_loader *loader, const char *str, unsigned str_len)
 
 static grn_rc
 parse_load_columns(grn_ctx *ctx, grn_obj *table,
-                   const char *str, unsigned str_size, grn_obj *res)
+                   const char *str, unsigned int str_size, grn_obj *res)
 {
   const char *p = (char *)str, *q, *r, *pe = p + str_size, *tokbuf[256];
   while (p < pe) {
@@ -9074,11 +9074,11 @@ static grn_com_addr *addr;
 
 grn_rc
 grn_load(grn_ctx *ctx, grn_content_type input_type,
-         const char *table, unsigned table_len,
-         const char *columns, unsigned columns_len,
-         const char *values, unsigned values_len,
-         const char *ifexists, unsigned ifexists_len,
-         const char *each, unsigned each_len)
+         const char *table, unsigned int table_len,
+         const char *columns, unsigned int columns_len,
+         const char *values, unsigned int values_len,
+         const char *ifexists, unsigned int ifexists_len,
+         const char *each, unsigned int each_len)
 {
   grn_loader *loader;
   if (!ctx || !ctx->impl) {

  Modified: lib/db.h (+7 -7)
===================================================================
--- lib/db.h    2012-01-12 18:26:55 +0900 (ae9e13f)
+++ lib/db.h    2012-01-13 10:12:31 +0900 (58c5cf6)
@@ -1,5 +1,5 @@
 /* -*- c-basic-offset: 2 -*- */
-/* Copyright(C) 2009 Brazil
+/* Copyright(C) 2009-2012 Brazil
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
@@ -187,7 +187,7 @@ struct _grn_proc {
 #define GRN_PROC_ALLOC(domain, flags) (grn_proc_alloc(ctx, user_data, domain, flags))
 
 grn_obj *grn_proc_get_var(grn_ctx *ctx, grn_user_data *user_data,
-                          const char *name, unsigned name_size);
+                          const char *name, unsigned int name_size);
 
 GRN_API grn_obj *grn_proc_get_var_by_offset(grn_ctx *ctx, grn_user_data *user_data,
                                             unsigned int offset);
@@ -196,7 +196,7 @@ GRN_API grn_obj *grn_proc_alloc(grn_ctx *ctx, grn_user_data *user_data,
                                 grn_id domain, grn_obj_flags flags);
 
 grn_obj *grn_expr_get_or_add_var(grn_ctx *ctx, grn_obj *expr,
-                                 const char *name, unsigned name_size);
+                                 const char *name, unsigned int name_size);
 
 typedef struct _grn_accessor_view grn_accessor_view;
 
@@ -323,7 +323,7 @@ GRN_API grn_rc grn_obj_cast(grn_ctx *ctx, grn_obj *src, grn_obj *dest, int addp)
  * dbに登録されている名前付きの永続テーブルを開く場合はgrn_ctx_get()を使用するのが望ましい。
  **/
 grn_obj *grn_table_open(grn_ctx *ctx,
-                        const char *name, unsigned name_size, const char *path);
+                        const char *name, unsigned int name_size, const char *path);
 
 /**
  * grn_column_open:
@@ -336,7 +336,7 @@ grn_obj *grn_table_open(grn_ctx *ctx,
  * 永続dbに登録されている永続テーブルのカラムを開く場合はgrn_ctx_get()を使用するのが望ましい。
  **/
 grn_obj *grn_column_open(grn_ctx *ctx, grn_obj *table,
-                         const char *name, unsigned name_size,
+                         const char *name, unsigned int name_size,
                          const char *path, grn_obj *type);
 
 /**
@@ -399,7 +399,7 @@ grn_rc grn_db_obj_init(grn_ctx *ctx, grn_obj *db, grn_id id, grn_db_obj *obj);
   }                                                     \
 }
 
-grn_id grn_obj_register(grn_ctx *ctx, grn_obj *db, const char *name, unsigned name_size);
+grn_id grn_obj_register(grn_ctx *ctx, grn_obj *db, const char *name, unsigned int name_size);
 int grn_obj_is_persistent(grn_ctx *ctx, grn_obj *obj);
 void grn_obj_spec_save(grn_ctx *ctx, grn_db_obj *obj);
 
@@ -416,7 +416,7 @@ void grn_expr_pack(grn_ctx *ctx, grn_obj *buf, grn_obj *expr);
 grn_rc grn_expr_inspect(grn_ctx *ctx, grn_obj *buf, grn_obj *expr);
 grn_obj *grn_expr_open(grn_ctx *ctx, grn_obj_spec *spec, const uint8_t *p, const uint8_t *pe);
 
-grn_obj *grn_table_create_for_group(grn_ctx *ctx, const char *name, unsigned name_size,
+grn_obj *grn_table_create_for_group(grn_ctx *ctx, const char *name, unsigned int name_size,
                                     const char *path, grn_obj_flags flags,
                                     grn_obj *group_key, grn_obj *value_type);
 

  Modified: lib/expr.c (+11 -11)
===================================================================
--- lib/expr.c    2012-01-12 18:26:55 +0900 (8fe38be)
+++ lib/expr.c    2012-01-13 10:12:31 +0900 (12ccb84)
@@ -51,7 +51,7 @@ grn_expr_alloc(grn_ctx *ctx, grn_obj *expr, grn_id domain, grn_obj_flags flags)
 }
 
 static grn_hash *
-grn_expr_get_vars(grn_ctx *ctx, grn_obj *expr, unsigned *nvars)
+grn_expr_get_vars(grn_ctx *ctx, grn_obj *expr, unsigned int *nvars)
 {
   grn_hash *vars = NULL;
   if (expr->header.type == GRN_PROC || expr->header.type == GRN_EXPR) {
@@ -103,7 +103,7 @@ grn_expr_clear_vars(grn_ctx *ctx, grn_obj *expr)
 
 grn_obj *
 grn_proc_get_info(grn_ctx *ctx, grn_user_data *user_data,
-                  grn_expr_var **vars, unsigned *nvars, grn_obj **caller)
+                  grn_expr_var **vars, unsigned int *nvars, grn_obj **caller)
 {
   grn_proc_ctx *pctx = (grn_proc_ctx *)user_data;
   if (caller) { *caller = pctx->caller; }
@@ -121,7 +121,7 @@ grn_proc_get_info(grn_ctx *ctx, grn_user_data *user_data,
 }
 
 grn_obj *
-grn_proc_get_var(grn_ctx *ctx, grn_user_data *user_data, const char *name, unsigned name_size)
+grn_proc_get_var(grn_ctx *ctx, grn_user_data *user_data, const char *name, unsigned int name_size)
 {
   grn_proc_ctx *pctx = (grn_proc_ctx *)user_data;
   return pctx->proc ? grn_expr_get_var(ctx, (grn_obj *)pctx->proc, name, name_size) : NULL;
@@ -533,7 +533,7 @@ dfi_value_at(grn_expr *expr, int offset)
 }
 
 grn_obj *
-grn_expr_create(grn_ctx *ctx, const char *name, unsigned name_size)
+grn_expr_create(grn_ctx *ctx, const char *name, unsigned int name_size)
 {
   grn_id id;
   grn_obj *db;
@@ -652,7 +652,7 @@ grn_expr_close(grn_ctx *ctx, grn_obj *expr)
 }
 
 grn_obj *
-grn_expr_add_var(grn_ctx *ctx, grn_obj *expr, const char *name, unsigned name_size)
+grn_expr_add_var(grn_ctx *ctx, grn_obj *expr, const char *name, unsigned int name_size)
 {
   uint32_t i;
   char *p;
@@ -691,7 +691,7 @@ grn_expr_add_var(grn_ctx *ctx, grn_obj *expr, const char *name, unsigned name_si
 }
 
 grn_obj *
-grn_expr_get_var(grn_ctx *ctx, grn_obj *expr, const char *name, unsigned name_size)
+grn_expr_get_var(grn_ctx *ctx, grn_obj *expr, const char *name, unsigned int name_size)
 {
   uint32_t n;
   grn_obj *res = NULL;
@@ -701,7 +701,7 @@ grn_expr_get_var(grn_ctx *ctx, grn_obj *expr, const char *name, unsigned name_si
 }
 
 grn_obj *
-grn_expr_get_or_add_var(grn_ctx *ctx, grn_obj *expr, const char *name, unsigned name_size)
+grn_expr_get_or_add_var(grn_ctx *ctx, grn_obj *expr, const char *name, unsigned int name_size)
 {
   uint32_t n;
   grn_obj *res = NULL;
@@ -1194,7 +1194,7 @@ exit :
 }
 
 static grn_obj *
-grn_expr_add_str(grn_ctx *ctx, grn_obj *expr, const char *str, unsigned str_size)
+grn_expr_add_str(grn_ctx *ctx, grn_obj *expr, const char *str, unsigned int str_size)
 {
   grn_obj *res = NULL;
   grn_expr *e = (grn_expr *)expr;
@@ -1207,7 +1207,7 @@ grn_expr_add_str(grn_ctx *ctx, grn_obj *expr, const char *str, unsigned str_size
 }
 
 grn_obj *
-grn_expr_append_const_str(grn_ctx *ctx, grn_obj *expr, const char *str, unsigned str_size,
+grn_expr_append_const_str(grn_ctx *ctx, grn_obj *expr, const char *str, unsigned int str_size,
                           grn_operator op, int nargs)
 {
   grn_obj *res;
@@ -5127,7 +5127,7 @@ done :
   {
     grn_obj *obj;
     const char *name = q->cur;
-    unsigned name_size = s - q->cur;
+    unsigned int name_size = s - q->cur;
     if ((obj = grn_expr_get_var(ctx, q->e, name, name_size))) {
       PARSE(GRN_EXPR_TOKEN_IDENTIFIER);
       grn_expr_append_obj(ctx, q->e, obj, GRN_OP_PUSH, 1);
@@ -5587,7 +5587,7 @@ exit :
 
 grn_rc
 grn_expr_parse(grn_ctx *ctx, grn_obj *expr,
-               const char *str, unsigned str_size,
+               const char *str, unsigned int str_size,
                grn_obj *default_column, grn_operator default_mode,
                grn_operator default_op, grn_expr_flags flags)
 {

  Modified: lib/ii.c (+7 -7)
===================================================================
--- lib/ii.c    2012-01-12 18:26:55 +0900 (03149a1)
+++ lib/ii.c    2012-01-13 10:12:31 +0900 (6d0e8e3)
@@ -1,5 +1,5 @@
 /* -*- c-basic-offset: 2 -*- */
-/* Copyright(C) 2009 Brazil
+/* Copyright(C) 2009-2012 Brazil
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
@@ -3309,7 +3309,7 @@ buffer_new(grn_ctx *ctx, grn_ii *ii, int size, uint32_t *pos,
   grn_id tid;
   uint16_t offset;
   char key[GRN_TABLE_MAX_KEY_SIZE];
-  // unsigned key_size;
+  // unsigned int key_size;
   // const char *key = _grn_table_key(ctx, ii->lexicon, id, &key_size);
   int key_size = grn_table_get_key(ctx, ii->lexicon, id, key, GRN_TABLE_MAX_KEY_SIZE);
   uint32_t *a, lseg = NOT_ASSIGNED, pseg = NOT_ASSIGNED;
@@ -4383,11 +4383,11 @@ grn_ii_estimate_size(grn_ctx *ctx, grn_ii *ii, grn_id tid)
 }
 
 int
-grn_ii_entry_info(grn_ctx *ctx, grn_ii *ii, grn_id tid, unsigned *a,
-                   unsigned *chunk, unsigned *chunk_size, unsigned *buffer_free,
-                   unsigned *nterms, unsigned *nterms_void, unsigned *bt_tid,
-                   unsigned *size_in_chunk, unsigned *pos_in_chunk,
-                   unsigned *size_in_buffer, unsigned *pos_in_buffer)
+grn_ii_entry_info(grn_ctx *ctx, grn_ii *ii, grn_id tid, unsigned int *a,
+                   unsigned int *chunk, unsigned int *chunk_size, unsigned int *buffer_free,
+                   unsigned int *nterms, unsigned int *nterms_void, unsigned int *bt_tid,
+                   unsigned int *size_in_chunk, unsigned int *pos_in_chunk,
+                   unsigned int *size_in_buffer, unsigned int *pos_in_buffer)
 {
   buffer *b;
   buffer_term *bt;

  Modified: lib/pat.c (+4 -4)
===================================================================
--- lib/pat.c    2012-01-12 18:26:55 +0900 (19d5c92)
+++ lib/pat.c    2012-01-13 10:12:31 +0900 (4470b25)
@@ -1,5 +1,5 @@
 /* -*- c-basic-offset: 2 -*- */
-/* Copyright(C) 2009 Brazil
+/* Copyright(C) 2009-2012 Brazil
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
@@ -1331,8 +1331,8 @@ grn_pat_set_value(grn_ctx *ctx, grn_pat *pat, grn_id id,
 }
 
 grn_rc
-grn_pat_info(grn_ctx *ctx, grn_pat *pat, int *key_size, unsigned *flags,
-             grn_encoding *encoding, unsigned *n_entries, unsigned *file_size)
+grn_pat_info(grn_ctx *ctx, grn_pat *pat, int *key_size, unsigned int *flags,
+             grn_encoding *encoding, unsigned int *n_entries, unsigned int *file_size)
 {
   ERRCLR(NULL);
   if (!pat) { return GRN_INVALID_ARGUMENT; }
@@ -1346,7 +1346,7 @@ grn_pat_info(grn_ctx *ctx, grn_pat *pat, int *key_size, unsigned *flags,
     if ((rc = grn_io_size(ctx, pat->io, &tmp))) {
       return rc;
     }
-    *file_size = (unsigned) tmp; /* FIXME: inappropriate cast */
+    *file_size = (unsigned int) tmp; /* FIXME: inappropriate cast */
   }
   return GRN_SUCCESS;
 }

  Modified: lib/proc.c (+17 -17)
===================================================================
--- lib/proc.c    2012-01-12 18:26:55 +0900 (cc0731e)
+++ lib/proc.c    2012-01-13 10:12:31 +0900 (2fa1569)
@@ -98,7 +98,7 @@ substitute_query(grn_ctx *ctx, grn_obj *table, grn_obj *column,
 {
   grn_id id;
   grn_rc rc = GRN_END_OF_DATA;
-  if ((id = grn_table_get(ctx, table, (const void *)key, (unsigned)key_size))) {
+  if ((id = grn_table_get(ctx, table, (const void *)key, (unsigned int)key_size))) {
     if ((column->header.type == GRN_COLUMN_VAR_SIZE) &&
         ((column->header.flags & GRN_OBJ_COLUMN_TYPE_MASK) == GRN_OBJ_COLUMN_VECTOR)) {
       unsigned int i, n;
@@ -130,7 +130,7 @@ substitute_query(grn_ctx *ctx, grn_obj *table, grn_obj *column,
 
 static grn_rc
 expand_query(grn_ctx *ctx, grn_obj *table, grn_obj *column, grn_expr_flags flags,
-             const char *str, unsigned str_len, grn_obj *dest)
+             const char *str, unsigned int str_len, grn_obj *dest)
 {
   grn_obj buf;
   unsigned int len;
@@ -248,21 +248,21 @@ exit :
 #define DUMP_COLUMNS            "_id, _key, _value, *"
 
 grn_rc
-grn_select(grn_ctx *ctx, const char *table, unsigned table_len,
-           const char *match_columns, unsigned match_columns_len,
-           const char *query, unsigned query_len,
-           const char *filter, unsigned filter_len,
-           const char *scorer, unsigned scorer_len,
-           const char *sortby, unsigned sortby_len,
-           const char *output_columns, unsigned output_columns_len,
+grn_select(grn_ctx *ctx, const char *table, unsigned int table_len,
+           const char *match_columns, unsigned int match_columns_len,
+           const char *query, unsigned int query_len,
+           const char *filter, unsigned int filter_len,
+           const char *scorer, unsigned int scorer_len,
+           const char *sortby, unsigned int sortby_len,
+           const char *output_columns, unsigned int output_columns_len,
            int offset, int limit,
-           const char *drilldown, unsigned drilldown_len,
-           const char *drilldown_sortby, unsigned drilldown_sortby_len,
-           const char *drilldown_output_columns, unsigned drilldown_output_columns_len,
+           const char *drilldown, unsigned int drilldown_len,
+           const char *drilldown_sortby, unsigned int drilldown_sortby_len,
+           const char *drilldown_output_columns, unsigned int drilldown_output_columns_len,
            int drilldown_offset, int drilldown_limit,
-           const char *cache, unsigned cache_len,
-           const char *match_escalation_threshold, unsigned match_escalation_threshold_len,
-           const char *query_expansion, unsigned query_expansion_len)
+           const char *cache, unsigned int cache_len,
+           const char *match_escalation_threshold, unsigned int match_escalation_threshold_len,
+           const char *query_expansion, unsigned int query_expansion_len)
 {
   uint32_t nkeys, nhits;
   uint16_t cacheable = 1, taintable = 0;
@@ -970,7 +970,7 @@ proc_column_remove(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_
 {
   grn_obj *table, *col;
   char *colname,fullname[GRN_TABLE_MAX_KEY_SIZE];
-  unsigned colname_len,fullname_len;
+  unsigned int colname_len,fullname_len;
 
   table = grn_ctx_get(ctx, GRN_TEXT_VALUE(VAR(0)),
                            GRN_TEXT_LEN(VAR(0)));
@@ -1649,7 +1649,7 @@ proc_delete(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
     } else if (GRN_TEXT_LEN(VAR(3))) {
       grn_obj *cond, *v;
       const char *filter = GRN_TEXT_VALUE(VAR(3));
-      unsigned filter_len = GRN_TEXT_LEN(VAR(3));
+      unsigned int filter_len = GRN_TEXT_LEN(VAR(3));
 
       GRN_EXPR_CREATE_FOR_QUERY(ctx, table, cond, v);
       grn_expr_parse(ctx, cond, filter, filter_len,

  Modified: lib/ql.c (+9 -9)
===================================================================
--- lib/ql.c    2012-01-12 18:26:55 +0900 (cf0327c)
+++ lib/ql.c    2012-01-13 10:12:31 +0900 (f0be9e4)
@@ -1,5 +1,5 @@
 /* -*- c-basic-offset: 2 -*- */
-/* Copyright(C) 2009 Brazil
+/* Copyright(C) 2009-2012 Brazil
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
@@ -433,7 +433,7 @@ unesc(grn_ctx *ctx, grn_cell *obj)
 }
 
 static grn_cell *
-grn_ql_table_add(grn_ctx *ctx, grn_obj *table, const void *key, unsigned key_size, grn_cell *res)
+grn_ql_table_add(grn_ctx *ctx, grn_obj *table, const void *key, unsigned int key_size, grn_cell *res)
 {
   grn_id id = grn_table_add(ctx, table, key, key_size, NULL);
   if (id) {
@@ -446,7 +446,7 @@ grn_ql_table_add(grn_ctx *ctx, grn_obj *table, const void *key, unsigned key_siz
 }
 
 static grn_cell *
-grn_ql_table_get(grn_ctx *ctx, grn_obj *table, const void *key, unsigned key_size, grn_cell *res)
+grn_ql_table_get(grn_ctx *ctx, grn_obj *table, const void *key, unsigned int key_size, grn_cell *res)
 {
   grn_id id = grn_table_get(ctx, table, key, key_size);
   if (id) {
@@ -459,7 +459,7 @@ grn_ql_table_get(grn_ctx *ctx, grn_obj *table, const void *key, unsigned key_siz
 }
 
 static grn_obj *
-get_column(grn_ctx *ctx, grn_id tid, char *msg, unsigned msg_size, grn_id *id)
+get_column(grn_ctx *ctx, grn_id tid, char *msg, unsigned int msg_size, grn_id *id)
 {
   grn_obj *table = grn_ctx_at(ctx, tid);
   for (;;) {
@@ -474,7 +474,7 @@ get_column(grn_ctx *ctx, grn_id tid, char *msg, unsigned msg_size, grn_id *id)
 }
 
 static grn_cell *
-table_column(grn_ctx *ctx, grn_id base, char *msg, unsigned msg_size)
+table_column(grn_ctx *ctx, grn_id base, char *msg, unsigned int msg_size)
 {
   grn_obj *column = get_column(ctx, base, msg, msg_size, NULL);
   return column ? get_cell(ctx, column) : F;
@@ -851,7 +851,7 @@ column_value(grn_ctx *ctx, grn_obj *column, grn_id obj,
 }
 
 static grn_cell *
-register_cell(grn_ctx *ctx, grn_obj *db_obj, const char *name, unsigned name_size)
+register_cell(grn_ctx *ctx, grn_obj *db_obj, const char *name, unsigned int name_size)
 {
   if (name && name_size) {
     return INTERN2(name, name_size);
@@ -868,7 +868,7 @@ register_cell(grn_ctx *ctx, grn_obj *db_obj, const char *name, unsigned name_siz
 }
 
 static grn_cell *
-table_create(grn_ctx *ctx, const char *name, unsigned name_size,
+table_create(grn_ctx *ctx, const char *name, unsigned int name_size,
              grn_obj_flags flags, grn_obj *domain,
              grn_obj *value_type, grn_id tokenizer)
 {
@@ -897,9 +897,9 @@ typedef struct {
   int32_t limit;
   int mode;
   char *from;
-  unsigned fromsize;
+  unsigned int fromsize;
   char *to;
-  unsigned tosize;
+  unsigned int tosize;
   column_exp *score_ce;
   grn_cell *score_func;
 } match_spec;

  Modified: lib/scm.c (+3 -3)
===================================================================
--- lib/scm.c    2012-01-12 18:26:55 +0900 (6154c26)
+++ lib/scm.c    2012-01-13 10:12:31 +0900 (70697d4)
@@ -1898,7 +1898,7 @@ opexe(grn_ctx *ctx)
   case OP_RDSEXPR:
     {
       char tok, *str;
-      unsigned len;
+      unsigned int len;
       RTN_NIL_IF_HEAD(ctx);
       switch (ctx->impl->tok) {
       case TOK_COMMENT:
@@ -1981,7 +1981,7 @@ opexe(grn_ctx *ctx)
       grn_cell *v = non_alloc_rev(NIL, ctx->impl->args);
       if (ctx->impl->cur < ctx->impl->str_end && *ctx->impl->cur == '.') {
         char *str = NULL;
-        unsigned len = 0;
+        unsigned int len = 0;
         if (readstr(ctx, &str, &len) != TOK_ATOM) { /* error */ }
         s_return(ctx, mk_atom(ctx, str, len, v));
       } else {
@@ -2007,7 +2007,7 @@ opexe(grn_ctx *ctx)
       grn_cell *v = non_alloc_rev(ctx->impl->value, ctx->impl->args);
       if (ctx->impl->cur < ctx->impl->str_end && *ctx->impl->cur == '.') {
         char *str = NULL;
-        unsigned len = 0;
+        unsigned int len = 0;
         if (readstr(ctx, &str, &len) != TOK_ATOM) { /* error */ }
         s_return(ctx, mk_atom(ctx, str, len, v));
       } else {

  Modified: lib/store.c (+2 -2)
===================================================================
--- lib/store.c    2012-01-12 18:26:55 +0900 (09aa87a)
+++ lib/store.c    2012-01-13 10:12:31 +0900 (bbad816)
@@ -1,5 +1,5 @@
 /* -*- c-basic-offset: 2 -*- */
-/* Copyright(C) 2009 Brazil
+/* Copyright(C) 2009-2012 Brazil
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
@@ -31,7 +31,7 @@ _grn_ra_create(grn_ctx *ctx, grn_ra *ra, const char *path, unsigned int element_
   grn_io *io;
   int max_segments, n_elm, w_elm;
   struct grn_ra_header *header;
-  unsigned actual_size;
+  unsigned int actual_size;
   if (element_size > GRN_RA_SEGMENT_SIZE) {
     GRN_LOG(ctx, GRN_LOG_ERROR, "element_size too large (%d)", element_size);
     return NULL;

  Modified: plugins/suggest/suggest.c (+3 -3)
===================================================================
--- plugins/suggest/suggest.c    2012-01-12 18:26:55 +0900 (c88dc9c)
+++ plugins/suggest/suggest.c    2012-01-13 10:12:31 +0900 (5323375)
@@ -1,5 +1,5 @@
 /* -*- c-basic-offset: 2 -*- */
-/* Copyright(C) 2010-2011 Brazil
+/* Copyright(C) 2010-2012 Brazil
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
@@ -168,9 +168,9 @@ output(grn_ctx *ctx, grn_obj *table, grn_obj *res, grn_id tid,
     grn_obj_format format;
     grn_table_sort_key *keys;
     const char *sortby_val = GRN_TEXT_VALUE(sortby);
-    unsigned sortby_len = GRN_TEXT_LEN(sortby);
+    unsigned int sortby_len = GRN_TEXT_LEN(sortby);
     const char *oc_val = GRN_TEXT_VALUE(output_columns);
-    unsigned oc_len = GRN_TEXT_LEN(output_columns);
+    unsigned int oc_len = GRN_TEXT_LEN(output_columns);
     if (!sortby_val || !sortby_len) {
       sortby_val = DEFAULT_SORTBY;
       sortby_len = sizeof(DEFAULT_SORTBY) - 1;

  Modified: src/grntest.c (+1 -1)
===================================================================
--- src/grntest.c    2012-01-12 18:26:55 +0900 (2f7d2cf)
+++ src/grntest.c    2012-01-13 10:12:31 +0900 (67bfbeb)
@@ -512,7 +512,7 @@ command_line_to_uri_path(grn_ctx *ctx, grn_obj *uri, const char *command)
   const char *p, *e, *v;
   grn_obj buf, *expr = NULL;
   grn_expr_var *vars;
-  unsigned nvars;
+  unsigned int nvars;
 
   GRN_TEXT_INIT(&buf, 0);
   p = command;




Groonga-commit メーリングリストの案内
Back to archive index