diff options
| author | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-04-14 12:47:09 +1000 |
|---|---|---|
| committer | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-04-14 12:47:09 +1000 |
| commit | 518141f0d6083cb27db474405c456717256546f5 (patch) | |
| tree | d3011f585f870d48c9799317bf10379cc52dd079 /include/tinyff | |
| parent | 3bf2762fc146977f36f5d2c6d1ca2fd8c5f60861 (diff) | |
feat(common): Create embeddable ff_memcpy
Diffstat (limited to 'include/tinyff')
| -rw-r--r-- | include/tinyff/common.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/tinyff/common.h b/include/tinyff/common.h index c22f595..653cb6d 100644 --- a/include/tinyff/common.h +++ b/include/tinyff/common.h @@ -51,6 +51,16 @@ static inline int ff_memcmp(const void *a, const void *b, size_t n) return 0; } +static inline void ff_memcpy(void *dest, const void *src, size_t n) +{ + uint8_t *pd = (uint8_t *)dest; + const uint8_t *ps = (const uint8_t *)src; + for (size_t i = 0; i < n; i++) { + pd[i] = ps[i]; + } +} + + // Context bases // Default |
