aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dynarr.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/dynarr.h b/include/dynarr.h
index 78871cb..23705c9 100644
--- a/include/dynarr.h
+++ b/include/dynarr.h
@@ -19,12 +19,15 @@
#endif
/* clang-format on */
+#define dafields(T) \
+ T *buf; \
+ size_t len, cap; \
+ alloc_fn alloc; \
+ void *ctx;
+
#define dynarr(T) \
struct { \
- T *buf; \
- size_t len, cap; \
- alloc_fn alloc; \
- void *ctx; \
+ dafields(T) \
}
#define DAPUSH(da, x) \