diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-03-29 00:44:46 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-03-29 00:44:46 +0100 |
commit | f11d57a13a679703b3e0132747156d62197a4733 (patch) | |
tree | 84a780c6f85f9c8136237e0f14147cc1b6dbcb37 | |
parent | f1437255f54753366513618ef315a1f50f88b4eb (diff) |
Add the dynarr() macro
-rw-r--r-- | include/dynarr.h | 2 |
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) { \ |