diff options
author | Jon Cruz <jonc@osg.samsung.com> | 2015-06-15 15:37:10 -0700 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2015-06-15 17:11:58 -0700 |
commit | 867d50eea7fc8be4e286ae751b75dcb4f27df99e (patch) | |
tree | 7e2fcbb6d60eb8fe63893df709b72a88bedfcee5 /clients | |
parent | d618f688d53e1df0ac31a275ae8541dc56f283ed (diff) | |
download | weston-867d50eea7fc8be4e286ae751b75dcb4f27df99e.tar.gz |
Unified multiple definitions of container_of() macro.
Removed duplicate definitions of the container_of() macro and
refactored sources to use the single implementation.
Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Diffstat (limited to 'clients')
-rw-r--r-- | clients/clickdot.c | 1 | ||||
-rw-r--r-- | clients/desktop-shell.c | 1 | ||||
-rw-r--r-- | clients/window.h | 4 |
3 files changed, 2 insertions, 4 deletions
diff --git a/clients/clickdot.c b/clients/clickdot.c index b5229742..776f8da8 100644 --- a/clients/clickdot.c +++ b/clients/clickdot.c @@ -40,6 +40,7 @@ #include <wayland-client.h> #include "window.h" +#include "shared/helpers.h" struct clickdot { struct display *display; diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index 03b1b193..9cf3d686 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -45,6 +45,7 @@ #include "window.h" #include "shared/cairo-util.h" #include "shared/config-parser.h" +#include "shared/helpers.h" #include "desktop-shell-client-protocol.h" diff --git a/clients/window.h b/clients/window.h index c47aa515..b61a62a1 100644 --- a/clients/window.h +++ b/clients/window.h @@ -33,10 +33,6 @@ #include "shared/zalloc.h" #include "shared/platform.h" -#define container_of(ptr, type, member) ({ \ - const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) - struct window; struct widget; struct display; |