aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-06-01 15:11:48 -0700
committerSimon Ser <contact@emersion.fr>2019-06-05 09:58:14 +0000
commit55d044810ca32ae24499d2c6aee6084d7e31d576 (patch)
tree8a8ca16c2a45078ba8c0c2635b0a86547cd7889f /tests
parentAdd a missing -pthread to fix compile with slibtool. (diff)
downloadwayland-55d044810ca32ae24499d2c6aee6084d7e31d576.tar
wayland-55d044810ca32ae24499d2c6aee6084d7e31d576.tar.gz
wayland-55d044810ca32ae24499d2c6aee6084d7e31d576.tar.bz2
wayland-55d044810ca32ae24499d2c6aee6084d7e31d576.tar.lz
wayland-55d044810ca32ae24499d2c6aee6084d7e31d576.tar.xz
wayland-55d044810ca32ae24499d2c6aee6084d7e31d576.tar.zst
wayland-55d044810ca32ae24499d2c6aee6084d7e31d576.zip
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/client-test.c2
-rw-r--r--tests/display-test.c2
-rw-r--r--tests/event-loop-test.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/client-test.c b/tests/client-test.c
index 2e332f8..960cfa9 100644
--- a/tests/client-test.c
+++ b/tests/client-test.c
@@ -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;
}
diff --git a/tests/display-test.c b/tests/display-test.c
index 6d98cc7..74a24f1 100644
--- a/tests/display-test.c
+++ b/tests/display-test.c
@@ -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;
}
diff --git a/tests/event-loop-test.c b/tests/event-loop-test.c
index 33566b4..9659815 100644
--- a/tests/event-loop-test.c
+++ b/tests/event-loop-test.c
@@ -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;
}