diff options
Diffstat (limited to 'collections/vector/vector.c')
-rw-r--r-- | collections/vector/vector.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/collections/vector/vector.c b/collections/vector/vector.c index 5c473a4..c456d8a 100644 --- a/collections/vector/vector.c +++ b/collections/vector/vector.c @@ -237,6 +237,16 @@ int i; return vec_pop(root); } +void vec_truncate(root, size) +vec *root; +int size; +{ + if (!root || size < 0 || size >= root->end) + return; + + root->end = size; +} + void vec_clear(root) vec *root; { |