Blob


1 /* See LICENSE file for copyright and license details. */
2 #ifndef UTIL_H
3 #define UTIL_H
5 #include "../gen/types.h"
7 #define LEN(x) (sizeof(x) / sizeof(*(x)))
9 #ifdef __has_attribute
10 #if __has_attribute(optnone)
11 void libgrapheme(const void *) __attribute__((optnone));
12 void libutf8proc(const void *) __attribute__((optnone));
13 #endif
14 #endif
16 uint_least32_t *generate_cp_test_buffer(const struct break_test *, size_t,
17 size_t *);
18 char *generate_utf8_test_buffer(const struct break_test *, size_t, size_t *);
20 void run_benchmark(void (*func)(const void *), const void *, const char *,
21 const char *, const char *, double *, size_t, size_t);
23 #endif /* UTIL_H */