[PATCH 16/22] mempcpy.3: SYNOPSIS: Use 'restrict' in prototypes
Alejandro Colomar
alx.manpages@gmail.com
Fri Mar 5 23:51:00 GMT 2021
glibc uses 'restrict' in mempcpy(), wmempcpy().
Let's use it here too.
.../glibc$ grep_glibc_prototype mempcpy
string/string.h:384:
extern void *mempcpy (void *__restrict __dest,
const void *__restrict __src, size_t __n)
__THROW __nonnull ((1, 2));
.../glibc$ grep_glibc_prototype wmempcpy
wcsmbs/wchar.h:276:
extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
const wchar_t *__restrict __s2, size_t __n)
__THROW;
.../glibc$
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man3/mempcpy.3 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/man3/mempcpy.3 b/man3/mempcpy.3
index 33c032c50..8a810e6a5 100644
--- a/man3/mempcpy.3
+++ b/man3/mempcpy.3
@@ -15,12 +15,15 @@ mempcpy, wmempcpy \- copy memory area
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <string.h>
.PP
-.BI "void *mempcpy(void *" dest ", const void *" src ", size_t " n );
+.BI "void *mempcpy(void *restrict " dest ", const void *restrict " src \
+", size_t " n );
.PP
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <wchar.h>
.PP
-.BI "wchar_t *wmempcpy(wchar_t *" dest ", const wchar_t *" src ", size_t " n );
+.BI "wchar_t *wmempcpy(wchar_t *restrict " dest \
+", const wchar_t *restrict " src ,
+.BI " size_t " n );
.fi
.SH DESCRIPTION
The
--
2.30.1.721.g45526154a5
More information about the Libc-alpha
mailing list