2018-07-07 15:56:37 +00:00
|
|
|
#ifndef UTIL_ARRAY_H
|
|
|
|
#define UTIL_ARRAY_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
2019-06-15 18:08:53 +00:00
|
|
|
#include <stdbool.h>
|
2021-07-01 07:57:30 +00:00
|
|
|
#include <wayland-util.h>
|
2018-07-07 15:56:37 +00:00
|
|
|
|
2021-07-01 07:57:30 +00:00
|
|
|
/**
|
|
|
|
* 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);
|
|
|
|
|
2022-08-18 09:51:21 +00:00
|
|
|
/**
|
|
|
|
* Grow or shrink the array to fit the specifized size.
|
|
|
|
*/
|
|
|
|
bool array_realloc(struct wl_array *arr, size_t size);
|
|
|
|
|
2018-07-07 15:56:37 +00:00
|
|
|
#endif
|