[Groonga-commit] groonga/groonga [master] grn_ii_buffer: change the type of sparsity to uint64_t.

Back to archive index

null+****@clear***** null+****@clear*****
2012年 2月 23日 (木) 20:28:50 JST


Daijiro MORI	2012-02-23 20:28:50 +0900 (Thu, 23 Feb 2012)

  New Revision: f695c087fbd9a8e10266ea951dc5671c85adf669

  Log:
    grn_ii_buffer: change the type of sparsity to uint64_t.

  Modified files:
    lib/db.c
    lib/ii.c
    lib/ii.h

  Modified: lib/db.c (+2 -2)
===================================================================
--- lib/db.c    2012-02-23 20:19:33 +0900 (e3f7c0c)
+++ lib/db.c    2012-02-23 20:28:50 +0900 (f186ca5)
@@ -5724,9 +5724,9 @@ build_index(grn_ctx *ctx, grn_obj *obj)
   if ((src = grn_ctx_at(ctx, *s))) {
     target = GRN_OBJ_TABLEP(src) ? src : grn_ctx_at(ctx, src->header.domain);
     if (target) {
-      uint32_t sparsity = 10;
+      uint64_t sparsity = 10;
       if (getenv("GRN_INDEX_SPARSITY")) {
-        uint32_t v = strtoul(getenv("GRN_INDEX_SPARSITY"), NULL, 0);
+        uint64_t v = strtoull(getenv("GRN_INDEX_SPARSITY"), NULL, 0);
         if (v != ULONG_MAX) { sparsity = v; }
       }
       grn_ii_build(ctx, (grn_ii *)obj, sparsity);

  Modified: lib/ii.c (+1 -1)
===================================================================
--- lib/ii.c    2012-02-23 20:19:33 +0900 (84b1b7a)
+++ lib/ii.c    2012-02-23 20:28:50 +0900 (0c57308)
@@ -7283,7 +7283,7 @@ grn_ii_buffer_parse(grn_ctx *ctx, grn_ii_buffer *ii_buffer,
 }
 
 grn_rc
-grn_ii_build(grn_ctx *ctx, grn_ii *ii, unsigned int sparsity)
+grn_ii_build(grn_ctx *ctx, grn_ii *ii, uint64_t sparsity)
 {
   grn_ii_buffer *ii_buffer = grn_ii_buffer_open(ctx, ii, sparsity);
   if (ii_buffer) {

  Modified: lib/ii.h (+1 -1)
===================================================================
--- lib/ii.h    2012-02-23 20:19:33 +0900 (1f70d98)
+++ lib/ii.h    2012-02-23 20:28:50 +0900 (4866860)
@@ -185,7 +185,7 @@ grn_rc grn_ii_at(grn_ctx *ctx, grn_ii *ii, grn_id id, grn_hash *s, grn_operator
 void grn_ii_inspect_elements(grn_ctx *ctx, grn_ii *ii, grn_obj *buf);
 void grn_ii_cursor_inspect(grn_ctx *ctx, grn_ii_cursor *c, grn_obj *buf);
 
-grn_rc grn_ii_build(grn_ctx *ctx, grn_ii *ii, unsigned int sparsity);
+grn_rc grn_ii_build(grn_ctx *ctx, grn_ii *ii, uint64_t sparsity);
 
 #ifdef __cplusplus
 }




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