mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 00:47:28 +01:00
basic-handsum-decode: use memcpy unless __wasm__
This commit is contained in:
1 parent
67591a3570
commit
ee923a973c
1 file changed
+5
-2
@@ -79,8 +79,7 @@ basic_handsum_decode__decode(basic_handsum_decode__pixel_buffer* dst,
|
||||
|
||||
#ifdef BASIC_HANDSUM_DECODE_IMPLEMENTATION
|
||||
|
||||
// We implement memcpy ourselves, instead of using "#include <string.h>", so
|
||||
// that we can compile this snippet with --target=wasm32.
|
||||
#ifdef __wasm__
|
||||
static void //
|
||||
basic_handsum_decode__memcpy(uint8_t* restrict dst,
|
||||
const uint8_t* restrict src,
|
||||
@@ -89,6 +88,10 @@ basic_handsum_decode__memcpy(uint8_t* restrict dst,
|
||||
*dst++ = *src++;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#include <string.h>
|
||||
#define basic_handsum_decode__memcpy memcpy
|
||||
#endif
|
||||
|
||||
static void //
|
||||
basic_handsum_decode__smooth_block_seams_16x16(uint8_t* b) {
|
||||
|
||||
Reference in new issue
Block a user