aboutsummaryrefslogtreecommitdiff
path: root/array.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-12-27 23:21:20 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-12-27 23:21:20 +0100
commitb7c6c43b64dd88a3f3cff692bf224654aef9b1e2 (patch)
tree4ab5c92a20afa7536d35495f1141881ea0fc8ada /array.h
parent727f9d7e76d96612b994ed85bad5ae6af25d7247 (diff)
downloadvis-b7c6c43b64dd88a3f3cff692bf224654aef9b1e2.tar.gz
vis-b7c6c43b64dd88a3f3cff692bf224654aef9b1e2.tar.xz
array: implement array_remove
Diffstat (limited to 'array.h')
-rw-r--r--array.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/array.h b/array.h
index 052bb50..bee8725 100644
--- a/array.h
+++ b/array.h
@@ -50,6 +50,8 @@ bool array_set_ptr(Array*, size_t idx, void *item);
/* add a new element to the end of the array */
bool array_add(Array*, void *item);
bool array_add_ptr(Array*, void *item);
+/* remove an element by index, might not shrink/release underlying memory */
+bool array_remove(Array*, size_t idx);
/* return the number of elements currently stored in the array */
size_t array_length(Array*);