From 0a9060e335d59f0ccaf5d9600abbcb938db30928 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 23 Jan 2024 16:06:31 +0100 Subject: Bump librune version --- vendor/librune/lib/builder/u8strinit.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 vendor/librune/lib/builder/u8strinit.c (limited to 'vendor/librune/lib/builder/u8strinit.c') diff --git a/vendor/librune/lib/builder/u8strinit.c b/vendor/librune/lib/builder/u8strinit.c new file mode 100644 index 0000000..caf061e --- /dev/null +++ b/vendor/librune/lib/builder/u8strinit.c @@ -0,0 +1,17 @@ +#include + +#include "builder.h" + +#include "internal/common.h" + +struct u8buf * +u8strinit(struct u8buf *b, size_t n) +{ + if (n && !(b->p = malloc(n))) + return nullptr; + else + b->p = nullptr; + b->len = 0; + b->cap = n; + return b; +} -- cgit v1.2.3