diff options
Diffstat (limited to 'vendor/librune/lib/builder')
-rw-r--r-- | vendor/librune/lib/builder/u8strfit.c | 4 | ||||
-rw-r--r-- | vendor/librune/lib/builder/u8strfree.c | 2 | ||||
-rw-r--r-- | vendor/librune/lib/builder/u8strgrow.c | 4 | ||||
-rw-r--r-- | vendor/librune/lib/builder/u8strinit.c | 11 | ||||
-rw-r--r-- | vendor/librune/lib/builder/u8strpushr.c | 4 | ||||
-rw-r--r-- | vendor/librune/lib/builder/u8strpushstr.c | 4 | ||||
-rw-r--r-- | vendor/librune/lib/builder/u8strpushu8.c | 4 |
7 files changed, 17 insertions, 16 deletions
diff --git a/vendor/librune/lib/builder/u8strfit.c b/vendor/librune/lib/builder/u8strfit.c index c59b4b0..d0f0ecb 100644 --- a/vendor/librune/lib/builder/u8strfit.c +++ b/vendor/librune/lib/builder/u8strfit.c @@ -4,8 +4,8 @@ #include "internal/common.h" -struct u8buf * -u8strfit(struct u8buf *b) +struct u8str * +u8strfit(struct u8str *b) { return (b->p = realloc(b->p, b->len)) ? b : nullptr; } diff --git a/vendor/librune/lib/builder/u8strfree.c b/vendor/librune/lib/builder/u8strfree.c index f425691..506c71b 100644 --- a/vendor/librune/lib/builder/u8strfree.c +++ b/vendor/librune/lib/builder/u8strfree.c @@ -3,7 +3,7 @@ #include "builder.h" void -u8strfree(struct u8buf b) +u8strfree(struct u8str b) { free(b.p); } diff --git a/vendor/librune/lib/builder/u8strgrow.c b/vendor/librune/lib/builder/u8strgrow.c index 253fcfc..022b216 100644 --- a/vendor/librune/lib/builder/u8strgrow.c +++ b/vendor/librune/lib/builder/u8strgrow.c @@ -6,8 +6,8 @@ static size_t nextpow2(size_t); -struct u8buf * -u8strgrow(struct u8buf *b, size_t n) +struct u8str * +u8strgrow(struct u8str *b, size_t n) { if (n > b->cap) { b->cap = nextpow2(n); diff --git a/vendor/librune/lib/builder/u8strinit.c b/vendor/librune/lib/builder/u8strinit.c index caf061e..29947e8 100644 --- a/vendor/librune/lib/builder/u8strinit.c +++ b/vendor/librune/lib/builder/u8strinit.c @@ -4,12 +4,13 @@ #include "internal/common.h" -struct u8buf * -u8strinit(struct u8buf *b, size_t n) +struct u8str * +u8strinit(struct u8str *b, size_t n) { - if (n && !(b->p = malloc(n))) - return nullptr; - else + if (n) { + if (!(b->p = malloc(n))) + return nullptr; + } else b->p = nullptr; b->len = 0; b->cap = n; diff --git a/vendor/librune/lib/builder/u8strpushr.c b/vendor/librune/lib/builder/u8strpushr.c index 89bb64f..60c1d50 100644 --- a/vendor/librune/lib/builder/u8strpushr.c +++ b/vendor/librune/lib/builder/u8strpushr.c @@ -3,8 +3,8 @@ #include "internal/common.h" -struct u8buf * -u8strpushr(struct u8buf *b, rune ch) +struct u8str * +u8strpushr(struct u8str *b, rune ch) { if (!u8strgrow(b, b->len + u8wdth(ch))) return nullptr; diff --git a/vendor/librune/lib/builder/u8strpushstr.c b/vendor/librune/lib/builder/u8strpushstr.c index b80ad35..a036840 100644 --- a/vendor/librune/lib/builder/u8strpushstr.c +++ b/vendor/librune/lib/builder/u8strpushstr.c @@ -5,8 +5,8 @@ #include "internal/common.h" -struct u8buf * -u8strpushstr(struct u8buf *b, const char *s) +struct u8str * +u8strpushstr(struct u8str *b, const char *s) { size_t n = strlen(s); if (!u8strgrow(b, b->len + n)) diff --git a/vendor/librune/lib/builder/u8strpushu8.c b/vendor/librune/lib/builder/u8strpushu8.c index 0bcf9fc..dc6db11 100644 --- a/vendor/librune/lib/builder/u8strpushu8.c +++ b/vendor/librune/lib/builder/u8strpushu8.c @@ -5,8 +5,8 @@ #include "internal/common.h" -struct u8buf * -u8strpushu8(struct u8buf *b, struct u8view v) +struct u8str * +u8strpushu8(struct u8str *b, struct u8view v) { if (!u8strgrow(b, b->len + v.len)) return nullptr; |