mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -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
|
|
@ -47,7 +47,7 @@ static void
|
|||
client_destroy_notify(struct wl_listener *l, void *data)
|
||||
{
|
||||
struct client_destroy_listener *listener =
|
||||
container_of(l, struct client_destroy_listener, listener);
|
||||
wl_container_of(l, listener, listener);
|
||||
|
||||
listener->done = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ display_destroy_notify(struct wl_listener *l, void *data)
|
|||
{
|
||||
struct display_destroy_listener *listener;
|
||||
|
||||
listener = container_of(l, struct display_destroy_listener, listener);
|
||||
listener = wl_container_of(l, listener, listener);
|
||||
listener->done = 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ static void
|
|||
event_loop_destroy_notify(struct wl_listener *l, void *data)
|
||||
{
|
||||
struct event_loop_destroy_listener *listener =
|
||||
container_of(l, struct event_loop_destroy_listener, listener);
|
||||
wl_container_of(l, listener, listener);
|
||||
|
||||
listener->done = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue