11 lines
305 B
C
11 lines
305 B
C
|
#include <string.h>
|
||
|
|
||
|
void* memcpy(void* restrict dstptr, const void* restrict srcptr, size_t size) {
|
||
|
unsigned char* dst = (unsigned char*) dstptr;
|
||
|
const unsigned char* src = (const unsigned char*) srcptr;
|
||
|
for (size_t i = 0; i < size; i++) {
|
||
|
dst[i] = src[i];
|
||
|
}
|
||
|
return dstptr;
|
||
|
}
|