aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-07-01 09:57:30 +0200
committerSimon Zeni <simon@bl4ckb0ne.ca>2021-07-01 10:35:39 -0400
commita6ed4ae3088fee654178dd063c77db108de890cd (patch)
tree4793665aa611b2d872b4e7d9c1e2b15605e84a85 /include
parentdbb0e2f75be0374724b0255b14bc72398d9907b5 (diff)
util/array: add array_remove_at
Diffstat (limited to 'include')
-rw-r--r--include/util/array.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/util/array.h b/include/util/array.h
index 32bc059f..9612e7db 100644
--- a/include/util/array.h
+++ b/include/util/array.h
@@ -4,6 +4,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
+#include <wayland-util.h>
size_t push_zeroes_to_end(uint32_t arr[], size_t n);
@@ -21,4 +22,9 @@ bool set_add(uint32_t values[], size_t *len, size_t cap, uint32_t target);
*/
bool set_remove(uint32_t values[], size_t *len, size_t cap, uint32_t target);
+/**
+ * Remove a chunk of memory of the specified size at the specified offset.
+ */
+void array_remove_at(struct wl_array *arr, size_t offset, size_t size);
+
#endif