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

@ -42,10 +42,6 @@
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
#define container_of(ptr, type, member) ({ \
const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
#define WL_MAP_SERVER_SIDE 0
#define WL_MAP_CLIENT_SIDE 1
#define WL_SERVER_ID_START 0xff000000