summaryrefslogtreecommitdiff
path: root/include/util/array.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/util/array.h')
-rw-r--r--include/util/array.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/util/array.h b/include/util/array.h
new file mode 100644
index 0000000..a51bdb6
--- /dev/null
+++ b/include/util/array.h
@@ -0,0 +1,18 @@
+#ifndef UTIL_ARRAY_H
+#define UTIL_ARRAY_H
+
+#include <stdlib.h>
+#include <stdbool.h>
+#include <wayland-util.h>
+
+/**
+ * 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);
+
+/**
+ * Grow or shrink the array to fit the specifized size.
+ */
+bool array_realloc(struct wl_array *arr, size_t size);
+
+#endif