[libc-commits] [PATCH] D111762: [libc] add memccpy and mempcpy
Tue Ly via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Oct 14 06:39:32 PDT 2021
lntue added inline comments.
================
Comment at: libc/src/string/memccpy.cpp:17
+LLVM_LIBC_FUNCTION(void *, memccpy,
+ (char *__restrict dest, const char *__restrict src, int c,
+ size_t count)) {
----------------
dest and src are void*
================
Comment at: libc/src/string/memccpy.cpp:29
+ }
+ return dest + i;
+}
----------------
nullptr is returned when `c` is not found,
================
Comment at: libc/src/string/memccpy.h:16
+
+void *memccpy(char *__restrict dest, const char *__restrict src, int c,
+ size_t count);
----------------
dest and src should be void*
================
Comment at: libc/src/string/mempcpy.h:16
+
+void *mempcpy(char *__restrict dest, const char *__restrict src, size_t count);
+
----------------
dest and src should be void*
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111762/new/
https://reviews.llvm.org/D111762
More information about the libc-commits
mailing list