mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
wayland-server: Add a wl_resource_for_each macro
This macro allows you to correctly iterate through a list of resources handling the opaque nature of this type.
This commit is contained in:
parent
dbc41f0344
commit
748c20c46f
1 changed files with 5 additions and 0 deletions
|
|
@ -298,6 +298,11 @@ struct wl_listener *
|
|||
wl_resource_get_destroy_listener(struct wl_resource *resource,
|
||||
wl_notify_func_t notify);
|
||||
|
||||
#define wl_resource_for_each(resource, list) \
|
||||
for (resource = 0, resource = wl_resource_from_link((list)->next); \
|
||||
wl_resource_get_link(resource) != (list); \
|
||||
resource = wl_resource_from_link(wl_resource_get_link(resource)->next))
|
||||
|
||||
struct wl_shm_buffer;
|
||||
|
||||
struct wl_shm_buffer *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue