aboutsummaryrefslogtreecommitdiff
path: root/vendor/librune/lib/builder
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-01-27 23:26:42 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-01-27 23:26:42 +0100
commit679f7928e27a95e559eb3a69febf0c6336e40234 (patch)
treeaf9c5bb35253086eb8e3ad3d7774e7349b3beefe /vendor/librune/lib/builder
parentfd502fd87b40ae7f60314d8d9009f739f1c5fcf3 (diff)
Bump librune
Diffstat (limited to 'vendor/librune/lib/builder')
-rw-r--r--vendor/librune/lib/builder/u8strfit.c4
-rw-r--r--vendor/librune/lib/builder/u8strfree.c2
-rw-r--r--vendor/librune/lib/builder/u8strgrow.c4
-rw-r--r--vendor/librune/lib/builder/u8strinit.c11
-rw-r--r--vendor/librune/lib/builder/u8strpushr.c4
-rw-r--r--vendor/librune/lib/builder/u8strpushstr.c4
-rw-r--r--vendor/librune/lib/builder/u8strpushu8.c4
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;