diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/__u8view.h | 13 | ||||
-rw-r--r-- | include/bob.h | 10 | ||||
-rw-r--r-- | include/mbstring.h | 10 |
3 files changed, 15 insertions, 18 deletions
diff --git a/include/__u8view.h b/include/__u8view.h new file mode 100644 index 0000000..c6073c7 --- /dev/null +++ b/include/__u8view.h @@ -0,0 +1,13 @@ +#ifndef MLIB___U8VIEW_H +#define MLIB___U8VIEW_H + +#include <stddef.h> + +#include "__charN_t.h" + +struct u8view { + const char8_t *p; + size_t len; +}; + +#endif /* !MLIB___U8VIEW_H */ diff --git a/include/bob.h b/include/bob.h index e39a769..699aa5e 100644 --- a/include/bob.h +++ b/include/bob.h @@ -5,15 +5,7 @@ #include "__charN_t.h" #include "__rune.h" - -#if !__MLIB_HAS_U8VIEW -# define __MLIB_HAS_U8VIEW 1 - -struct u8view { - const char8_t *p; - size_t len; -}; -#endif +#include "__u8view.h" struct u8str { char8_t *p; diff --git a/include/mbstring.h b/include/mbstring.h index e23a00b..3ac9277 100644 --- a/include/mbstring.h +++ b/include/mbstring.h @@ -6,15 +6,7 @@ #include "__charN_t.h" #include "__qmacros.h" #include "__rune.h" - -#if !__MLIB_HAS_U8VIEW -# define __MLIB_HAS_U8VIEW 1 - -struct u8view { - const char8_t *p; - size_t len; -}; -#endif +#include "__u8view.h" /* clang-format off */ #define U8_BYTE_1(x) (((x) & 0x80) == 0x00) |