From f11d57a13a679703b3e0132747156d62197a4733 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 29 Mar 2024 00:44:46 +0100 Subject: Add the dynarr() macro --- include/dynarr.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dynarr.h b/include/dynarr.h index 76307e5..1cd17ab 100644 --- a/include/dynarr.h +++ b/include/dynarr.h @@ -5,6 +5,8 @@ #include "alloc.h" +#define dynarr(T) struct { T *buf; size_t len, cap; } + #define DAGROW(da, n) \ do { \ if ((n) > (a)->cap) { \ -- cgit v1.2.3