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