Skip to content

Commit 314d693

Browse files
committed
Annotate mbstowcs_nonfatal() with restrict
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.
1 parent ef07d6e commit 314d693

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RichString.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void RichString_rewind(RichString* this, int count) {
6464

6565
#ifdef HAVE_LIBNCURSESW
6666

67-
static size_t mbstowcs_nonfatal(wchar_t* dest, const char* src, size_t n) {
67+
static size_t mbstowcs_nonfatal(wchar_t* restrict dest, const char* restrict src, size_t n) {
6868
size_t written = 0;
6969
mbstate_t ps = { 0 };
7070
bool broken = false;

0 commit comments

Comments
 (0)