From: Michael Tremer Date: Sun, 2 Feb 2025 16:24:47 +0000 (+0000) Subject: util: Add a simple buffer structure X-Git-Tag: 0.9.30~176 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41cbb91ae1674b43908470879014d6ad4b3cec8e;p=pakfire.git util: Add a simple buffer structure Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/util.h b/src/pakfire/util.h index 62693bdd..86b9bf76 100644 --- a/src/pakfire/util.h +++ b/src/pakfire/util.h @@ -32,6 +32,14 @@ #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) +/* + A simple buffer object +*/ +struct pakfire_buffer { + char* data; + size_t length; +}; + /* This implementation of realloc frees the original buffer if it could not be resized.