[Groonga-commit] groonga/groonga [master] Rename idx_at_() to grn_hash_io_idx_at().

Back to archive index

null+****@clear***** null+****@clear*****
2012年 3月 29日 (木) 18:48:23 JST


Susumu Yata	2012-03-29 18:48:23 +0900 (Thu, 29 Mar 2012)

  New Revision: a9e9f26abe680ac9478c515fefba9a9490415517

  Log:
    Rename idx_at_() to grn_hash_io_idx_at().

  Modified files:
    lib/hash.c

  Modified: lib/hash.c (+5 -5)
===================================================================
--- lib/hash.c    2012-03-29 18:33:54 +0900 (509fe47)
+++ lib/hash.c    2012-03-29 18:48:23 +0900 (c5e3ca7)
@@ -870,7 +870,7 @@ grn_hash_bitmap_at(grn_ctx *ctx, grn_hash *hash, grn_id id)
 }
 
 inline static grn_id *
-idx_at_(grn_ctx *ctx, grn_hash *hash, grn_id id)
+grn_hash_io_idx_at(grn_ctx *ctx, grn_hash *hash, grn_id id)
 {
   int flags = GRN_TABLE_ADD;
   void *pp;
@@ -880,7 +880,7 @@ idx_at_(grn_ctx *ctx, grn_hash *hash, grn_id id)
 
 #define IDX_AT(h,i) \
   (IO_HASHP(h) ?\
-   idx_at_(ctx, h, ((i) & *(h)->max_offset) + h->header->idx_offset) :\
+   grn_hash_io_idx_at(ctx, h, ((i) & *(h)->max_offset) + h->header->idx_offset) :\
    h->index + ((i) & *(h)->max_offset))
 
 #define KEY_AT(hash,pos,ptr) do {\
@@ -1290,7 +1290,7 @@ grn_hash_reset(grn_ctx *ctx, grn_hash *hash, uint32_t ne)
     offs = hash->header->idx_offset;
     offd = MAX_INDEX_SIZE - offs;
     for (i = 0; i < n; i += (IDX_MASK_IN_A_SEGMENT + 1)) {
-      dp = idx_at_(ctx, hash, i + offd); // todo : use idx_at
+      dp = grn_hash_io_idx_at(ctx, hash, i + offd); // todo : use idx_at
       if (!dp) { return GRN_NO_MEMORY_AVAILABLE; }
       memset(dp, 0, GRN_HASH_SEGMENT_SIZE);
     }
@@ -1305,7 +1305,7 @@ grn_hash_reset(grn_ctx *ctx, grn_hash *hash, uint32_t ne)
     uint32_t i, j, k, m0 = *hash->max_offset, m = n - 1, s;
     for (k = 0, j = 0; k < n0 && j <= m0; j++, sp++) {
       if (IO_HASHP(hash) && !(j & IDX_MASK_IN_A_SEGMENT)) {
-        sp = idx_at_(ctx, hash, j + offs);
+        sp = grn_hash_io_idx_at(ctx, hash, j + offs);
         if (!sp) { return GRN_NO_MEMORY_AVAILABLE; }
       }
       e = *sp;
@@ -1314,7 +1314,7 @@ grn_hash_reset(grn_ctx *ctx, grn_hash *hash, uint32_t ne)
       if (!ee) { return GRN_NO_MEMORY_AVAILABLE; }
       for (i = ee->key, s = STEP(i); ; i += s) {
         if (IO_HASHP(hash)) {
-          dp = idx_at_(ctx, hash, (i & m) + offd);
+          dp = grn_hash_io_idx_at(ctx, hash, (i & m) + offd);
           if (!dp) { return GRN_NO_MEMORY_AVAILABLE; }
         } else {
           dp = index + (i & m);




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