aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-03-29 00:44:46 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-03-29 00:44:46 +0100
commitf11d57a13a679703b3e0132747156d62197a4733 (patch)
tree84a780c6f85f9c8136237e0f14147cc1b6dbcb37 /include
parentf1437255f54753366513618ef315a1f50f88b4eb (diff)
Add the dynarr() macro
Diffstat (limited to 'include')
-rw-r--r--include/dynarr.h2
1 files changed, 2 insertions, 0 deletions
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) { \