]> Savannah Git Hosting - gnulib.git/commit
string-buffer: Add more API.
authorBruno Haible <bruno@clisp.org>
Wed, 25 Sep 2024 15:19:41 +0000 (17:19 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 25 Sep 2024 15:19:41 +0000 (17:19 +0200)
commitdb23a7eaa3b34be91f84c1ae758f90e78ccc3b72
tree8c500b04f23ec6a69c28f89f19c1e94e92192a03
parent2bbbc32f1527981473ed403d87c7f3ddbb906634
string-buffer: Add more API.

* lib/string-buffer.h: Include string-desc.h.
(sb_append1, sb_append_desc): New declarations.
(sb_append_c): Renamed from sb_append.
(sb_contents, sb_contents_c, sb_dupfree): New declarations.
(sb_dupfree_c): Renamed from sb_dupfree.
* lib/string-buffer.c (sb_append1, sb_append_desc): New functions.
(sb_append_c): Renamed from sb_append.
(sb_contents, sb_contents_c, sb_dupfree): New functions.
(sb_dupfree_c): Renamed from sb_dupfree. Optimize.
* modules/string-buffer (Depends-on): Add string-desc.
* tests/test-string-buffer.c (main): Use sb_append_c instead of
sb_append. Use sb_dupfree_c instead of sb_dupfree. Test also sb_append1,
sb_append_desc, sb_contents.
* NEWS: Mention the changes.
ChangeLog
NEWS
lib/string-buffer.c
lib/string-buffer.h
modules/string-buffer
tests/test-string-buffer.c