]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
avltreehash-list: Use the counted_by attribute.
authorBruno Haible <bruno@clisp.org>
Sun, 3 May 2026 12:07:23 +0000 (14:07 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 3 May 2026 13:34:24 +0000 (15:34 +0200)
* lib/gl_anyavltree_list1.h (struct gl_list_impl): Mark the table field
as counted_by table_size. Swap these fields (needed for clang).

ChangeLog
lib/gl_anyavltree_list1.h

index 08307dec69a8e206e60eefcf00ad94738f059683..84b05af28e020f9211225ec00df3d0c514835374 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-05-03  Bruno Haible  <bruno@clisp.org>
+
+       avltreehash-list: Use the counted_by attribute.
+       * lib/gl_anyavltree_list1.h (struct gl_list_impl): Mark the table field
+       as counted_by table_size. Swap these fields (needed for clang).
+
 2026-05-03  Bruno Haible  <bruno@clisp.org>
 
        carray-list: Use the counted_by attribute.
index 7c430fa0770ece0eb67cce3f7afb6d5d2326b9b4..760d56d61b105378bf9cc50ee04c29be35d888de 100644 (file)
@@ -56,8 +56,9 @@ struct gl_list_impl
   struct gl_list_impl_base base;
 #if WITH_HASHTABLE
   /* A hash table: managed as an array of collision lists.  */
-  struct gl_hash_entry **table;
   size_t table_size;
+  struct gl_hash_entry **table
+    _GL_ATTRIBUTE_COUNTED_BY (table_size);
 #endif
   struct gl_list_node_impl *root;   /* root node or NULL */
 };