summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/tinyff/common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/tinyff/common.h b/include/tinyff/common.h
index 34209e8..891f9ee 100644
--- a/include/tinyff/common.h
+++ b/include/tinyff/common.h
@@ -90,6 +90,13 @@ static inline void ff_memcpy(void *dest, const void *src, size_t n)
}
}
+static inline void *ff_memset(void *dest, int ch, size_t count) {
+ unsigned char *p = (unsigned char *)dest;
+ while (count--) {
+ *p++ = (unsigned char)ch;
+ }
+ return dest;
+}
// Context bases
// Default