From: Bruno Haible Date: Sun, 3 May 2026 12:46:15 +0000 (+0200) Subject: mbfile: Add comments regarding the counted_by attribute. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bba72b4e351ff057efc5473a5053faaba2d35596;p=thirdparty%2Fgnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index ca1cecc4dc..f0db5a714a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2026-05-03 Bruno Haible + + 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 linebuffer: Use the counted_by attribute. diff --git a/lib/mbfile.h b/lib/mbfile.h index c88fcffa96..040feae64f 100644 --- a/lib/mbfile.h +++ b/lib/mbfile.h @@ -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