mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
Use wl_container_of internally
Rather than have two versions of the macro with slightly different interfaces, just use wl_container_of internally. This also removes use of statement expressions, a GNU C extension. Signed-off-by: Michael Forney <mforney@mforney.org>
This commit is contained in:
parent
2485a5c274
commit
55d044810c
7 changed files with 11 additions and 14 deletions
|
|
@ -298,8 +298,8 @@ wl_event_queue_release(struct wl_event_queue *queue)
|
|||
struct wl_closure *closure;
|
||||
|
||||
while (!wl_list_empty(&queue->event_list)) {
|
||||
closure = container_of(queue->event_list.next,
|
||||
struct wl_closure, link);
|
||||
closure = wl_container_of(queue->event_list.next,
|
||||
closure, link);
|
||||
wl_list_remove(&closure->link);
|
||||
destroy_queued_closure(closure);
|
||||
}
|
||||
|
|
@ -1400,8 +1400,7 @@ dispatch_event(struct wl_display *display, struct wl_event_queue *queue)
|
|||
int opcode;
|
||||
bool proxy_destroyed;
|
||||
|
||||
closure = container_of(queue->event_list.next,
|
||||
struct wl_closure, link);
|
||||
closure = wl_container_of(queue->event_list.next, closure, link);
|
||||
wl_list_remove(&closure->link);
|
||||
opcode = closure->opcode;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue