Add wl_array_for_each

This commit is contained in:
Kristian Høgsberg 2012-03-04 13:40:49 -05:00
parent ab0c7c58b9
commit 8e2cac7ae4
3 changed files with 27 additions and 6 deletions

View file

@ -148,6 +148,11 @@ struct wl_array {
void *data;
};
#define wl_array_for_each(pos, array) \
for (pos = (array)->data; \
(const char *) pos < ((const char *) (array)->data + (array)->size); \
(pos)++)
void wl_array_init(struct wl_array *array);
void wl_array_release(struct wl_array *array);
void *wl_array_add(struct wl_array *array, int size);