aboutsummaryrefslogtreecommitdiff
path: root/collections/vector
diff options
context:
space:
mode:
Diffstat (limited to 'collections/vector')
-rw-r--r--collections/vector/vector.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/collections/vector/vector.c b/collections/vector/vector.c
index 2c75bc1..c2668e4 100644
--- a/collections/vector/vector.c
+++ b/collections/vector/vector.c
@@ -51,3 +51,13 @@ vec *root;
return root->end;
}
+void vec_resize(root)
+vec *root;
+{
+ if (!root)
+ return;
+
+ root->base = reallocarray(root->base, root->limit * 2, sizeof(void*));
+ assert(root->base);
+}
+