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:
Michael Forney 2019-06-01 15:11:48 -07:00 committed by Simon Ser
parent 2485a5c274
commit 55d044810c
7 changed files with 11 additions and 14 deletions

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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;
}