]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
readtokens: Use the counted_by attribute.
authorBruno Haible <bruno@clisp.org>
Sun, 3 May 2026 12:58:41 +0000 (14:58 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 3 May 2026 13:34:28 +0000 (15:34 +0200)
* lib/readtokens.h (struct tokenbuffer): Mark the buffer field as
counted_by size.

ChangeLog
lib/readtokens.h

index f0db5a714aab970a215a4113e8a92144a79ca81e..0d3772960594b1dda6ea6a57e9c40c1cfe1df3e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-05-03  Bruno Haible  <bruno@clisp.org>
+
+       readtokens: Use the counted_by attribute.
+       * lib/readtokens.h (struct tokenbuffer): Mark the buffer field as
+       counted_by size.
+
 2026-05-03  Bruno Haible  <bruno@clisp.org>
 
        mbfile: Add comments regarding the counted_by attribute.
index de83f996fc45ddfc87ff709d9e65509123d38eca..a47a96ede7c3787badf0cde76dec4b0999e7e758 100644 (file)
@@ -33,7 +33,8 @@ extern "C" {
 struct tokenbuffer
 {
   size_t size;
-  char *buffer;
+  char *buffer
+    _GL_ATTRIBUTE_COUNTED_BY (size);
 };
 typedef struct tokenbuffer token_buffer;