From 518141f0d6083cb27db474405c456717256546f5 Mon Sep 17 00:00:00 2001 From: TazyFoundSoup Date: Tue, 14 Apr 2026 12:47:09 +1000 Subject: feat(common): Create embeddable ff_memcpy --- include/tinyff/common.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- cgit v1.2.3