aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/dynarr.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/dynarr.h b/include/dynarr.h
index 3785e18..76307e5 100644
--- a/include/dynarr.h
+++ b/include/dynarr.h
@@ -34,7 +34,9 @@
(a)->len += (n); \
} while (false)
-#define DAREMOVE(da, i) DA_REMOVE_RANGE((a), (i), (i) + 1)
+#define DAPOP(da) ((da)->buf[--(da)->len])
+
+#define DAREMOVE(da, i) DA_REMOVE_RANGE((da), (i), (i) + 1)
#define DA_REMOVE_RANGE(da, i, j) \
do { \