diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-01-27 23:26:42 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-01-27 23:26:42 +0100 |
commit | 679f7928e27a95e559eb3a69febf0c6336e40234 (patch) | |
tree | af9c5bb35253086eb8e3ad3d7774e7349b3beefe /vendor/librune/include/builder.h | |
parent | fd502fd87b40ae7f60314d8d9009f739f1c5fcf3 (diff) |
Bump librune
Diffstat (limited to 'vendor/librune/include/builder.h')
-rw-r--r-- | vendor/librune/include/builder.h | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/vendor/librune/include/builder.h b/vendor/librune/include/builder.h index b711f97..271fcbf 100644 --- a/vendor/librune/include/builder.h +++ b/vendor/librune/include/builder.h @@ -4,28 +4,26 @@ #define _RUNE_NEEDS_U8VIEW 1 #include "internal/types.h" /* IWYU pragma: export */ -struct u8buf { +struct u8str { char8_t *p; size_t len, cap; }; -struct u8buf *u8strinit(struct u8buf *, size_t); -struct u8buf *u8strgrow(struct u8buf *, size_t); -struct u8buf *u8strfit(struct u8buf *); -void u8strfree(struct u8buf); +struct u8str *u8strinit(struct u8str *, size_t); +struct u8str *u8strgrow(struct u8str *, size_t); +struct u8str *u8strfit(struct u8str *); +void u8strfree(struct u8str); -struct u8buf *u8strpushr(struct u8buf *, rune); -struct u8buf *u8strpushstr(struct u8buf *, const char *); -struct u8buf *u8strpushu8(struct u8buf *, struct u8view); +struct u8str *u8strpushr(struct u8str *, rune); +struct u8str *u8strpushstr(struct u8str *, const char *); +struct u8str *u8strpushu8(struct u8str *, struct u8view); -#if __STDC_VERSION__ >= 201112L -# define u8strpush(b, x) \ - _Generic((x), \ - char: u8strpushr, \ - int: u8strpushr, \ - rune: u8strpushr, \ - char *: u8strpushstr, \ - struct u8view: u8strpushu8)((b), (x)) -#endif +#define u8strpush(b, x) \ + _Generic((x), \ + char: u8strpushr, \ + int: u8strpushr, \ + rune: u8strpushr, \ + char *: u8strpushstr, \ + struct u8view: u8strpushu8)((b), (x)) #endif /* !RUNE_BUILDER_H */ |