mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-01 22:58:40 -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
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue