diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2024-05-06 19:56:44 +0200 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2024-05-11 23:02:09 +0200 |
commit | 314d693c4bd4d45f36022e608fa073882f4c9fc9 (patch) | |
tree | 9d0f813539146ecdb9592e67e879e9aafa758c39 /RichString.c | |
parent | ef07d6ed9f1a862b40371d1a3c46341f08baf776 (diff) |
Annotate mbstowcs_nonfatal() with restrictmain
The arguments to our mbrtowc(3) wrapper should not alias, since they
also must not for mbrtowc(3).
Might help some compilers optimizing the code.
Diffstat (limited to 'RichString.c')
-rw-r--r-- | RichString.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/RichString.c b/RichString.c index 248b3ae0..390beb07 100644 --- a/RichString.c +++ b/RichString.c @@ -64,7 +64,7 @@ void RichString_rewind(RichString* this, int count) { #ifdef HAVE_LIBNCURSESW -static size_t mbstowcs_nonfatal(wchar_t* dest, const char* src, size_t n) { +static size_t mbstowcs_nonfatal(wchar_t* restrict dest, const char* restrict src, size_t n) { size_t written = 0; mbstate_t ps = { 0 }; bool broken = false; |