[Groonga-commit] groonga/groonga at adfba50 [master] hash: remove unused queue

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Tue Jan 30 09:50:38 JST 2018


Kouhei Sutou	2018-01-30 09:50:38 +0900 (Tue, 30 Jan 2018)

  New Revision: adfba505e95874cffe4491c6478426d565e520eb
  https://github.com/groonga/groonga/commit/adfba505e95874cffe4491c6478426d565e520eb

  Message:
    hash: remove unused queue

  Modified files:
    lib/grn_hash.h
    lib/hash.c

  Modified: lib/grn_hash.h (+0 -2)
===================================================================
--- lib/grn_hash.h    2018-01-30 09:48:49 +0900 (6e851c212)
+++ lib/grn_hash.h    2018-01-30 09:50:38 +0900 (cad46cbc2)
@@ -275,13 +275,11 @@ struct _grn_hash_header_common {
 struct _grn_hash_header_normal {
   GRN_HASH_HEADER_COMMON_FIELDS;
   grn_id garbages[GRN_HASH_MAX_KEY_SIZE_NORMAL];
-  grn_table_queue queue;
 };
 
 struct _grn_hash_header_large {
   GRN_HASH_HEADER_COMMON_FIELDS;
   grn_id garbages[GRN_HASH_MAX_KEY_SIZE_LARGE];
-  grn_table_queue queue;
 };
 
 struct _grn_hash_cursor {

  Modified: lib/hash.c (+0 -27)
===================================================================
--- lib/hash.c    2018-01-30 09:48:49 +0900 (2da4a504d)
+++ lib/hash.c    2018-01-30 09:50:38 +0900 (1f3c359b3)
@@ -1880,15 +1880,6 @@ grn_io_hash_init(grn_ctx *ctx, grn_hash *hash, const char *path,
   }
   header->truncated = GRN_FALSE;
   GRN_PTR_INIT(&(hash->token_filters), GRN_OBJ_VECTOR, GRN_ID_NIL);
-  {
-    grn_table_queue *queue;
-    if (GRN_HASH_IS_LARGE_KEY(hash)) {
-      queue = &(((grn_hash_header_large *)(header))->queue);
-    } else {
-      queue = &(((grn_hash_header_normal *)(header))->queue);
-    }
-    grn_table_queue_init(ctx, queue);
-  }
 
   hash->obj.header.flags = (header->flags & GRN_OBJ_FLAGS_MASK);
   hash->ctx = ctx;
@@ -2037,15 +2028,6 @@ grn_hash_open(grn_ctx *ctx, const char *path)
               hash->normalizer = grn_ctx_at(ctx, header->normalizer);
             }
             GRN_PTR_INIT(&(hash->token_filters), GRN_OBJ_VECTOR, GRN_ID_NIL);
-            {
-              grn_table_queue *queue;
-              if (GRN_HASH_IS_LARGE_KEY(hash)) {
-                queue = &(hash->header.large->queue);
-              } else {
-                queue = &(hash->header.normal->queue);
-              }
-              grn_table_queue_init(ctx, queue);
-            }
             hash->obj.header.flags = header->flags;
             return hash;
           } else {
@@ -2121,15 +2103,6 @@ grn_hash_close(grn_ctx *ctx, grn_hash *hash)
   grn_rc rc;
   if (!ctx || !hash) { return GRN_INVALID_ARGUMENT; }
   if (grn_hash_is_io_hash(hash)) {
-    {
-      grn_table_queue *queue;
-      if (GRN_HASH_IS_LARGE_KEY(hash)) {
-        queue = &(hash->header.large->queue);
-      } else {
-        queue = &(hash->header.normal->queue);
-      }
-      grn_table_queue_fin(ctx, queue);
-    }
     rc = grn_io_close(ctx, hash->io);
     GRN_OBJ_FIN(ctx, &(hash->token_filters));
   } else {
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180130/5a69ee2c/attachment-0001.htm 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る