mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-05-13 15:13:36 +00:00
quotearg: Optimize clearing an mbstate_t.
* lib/quotearg.c: Include <wchar.h>. (quotearg_buffer_restyled): Use mbszero. * modules/quotearg (Depends-on): Add mbszero.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2023-07-16 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
quotearg: Optimize clearing an mbstate_t.
|
||||
* lib/quotearg.c: Include <wchar.h>.
|
||||
(quotearg_buffer_restyled): Use mbszero.
|
||||
* modules/quotearg (Depends-on): Add mbszero.
|
||||
|
||||
2023-07-16 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
vasnprintf, vasnwprintf: Optimize clearing an mbstate_t.
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <uchar.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include "gettext.h"
|
||||
#define _(msgid) gettext (msgid)
|
||||
@@ -607,7 +608,7 @@ quotearg_buffer_restyled (char *buffer, size_t buffersize,
|
||||
else
|
||||
{
|
||||
mbstate_t mbstate;
|
||||
memset (&mbstate, 0, sizeof mbstate);
|
||||
mbszero (&mbstate);
|
||||
|
||||
m = 0;
|
||||
printable = true;
|
||||
|
||||
@@ -13,6 +13,7 @@ c-strcaseeq
|
||||
c32isprint
|
||||
extensions
|
||||
gettext-h
|
||||
mbszero
|
||||
mbrtoc32
|
||||
mbsinit
|
||||
memcmp
|
||||
|
||||
Reference in New Issue
Block a user