]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
mbfile: Add comments regarding the counted_by attribute.
authorBruno Haible <bruno@clisp.org>
Sun, 3 May 2026 12:46:15 +0000 (14:46 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 3 May 2026 13:34:28 +0000 (15:34 +0200)
* lib/mbfile.h (struct mbfile_multi): Clarify how many elements of the
fields buf and pushback are used.

ChangeLog
lib/mbfile.h

index ca1cecc4dcf7f2fe07e8224b887bfc7d39a85e68..f0db5a714aab970a215a4113e8a92144a79ca81e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-05-03  Bruno Haible  <bruno@clisp.org>
+
+       mbfile: Add comments regarding the counted_by attribute.
+       * lib/mbfile.h (struct mbfile_multi): Clarify how many elements of the
+       fields buf and pushback are used.
+
 2026-05-03  Bruno Haible  <bruno@clisp.org>
 
        linebuffer: Use the counted_by attribute.
index c88fcffa968640c24e54e4cc9eb8e46ed2b30f56..040feae64f773ef1693c5b36ab0cd305e1425841 100644 (file)
@@ -79,8 +79,8 @@ struct mbfile_multi {
   unsigned int pushback_count; /* <= MBFILE_MAX_PUSHBACK */
   mbstate_t state;
   unsigned int bufcount;
-  char buf[MBCHAR_BUF_SIZE];
-  struct mbchar pushback[MBFILE_MAX_PUSHBACK];
+  char buf[MBCHAR_BUF_SIZE]; /* COUNTED_BY (bufcount) */
+  struct mbchar pushback[MBFILE_MAX_PUSHBACK]; /* COUNTED_BY (pushback_count) */
 };
 
 MBFILE_INLINE void