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>
This commit is contained in:
committed by
Bryce Harrington
parent
d618f688d5
commit
867d50eea7
@@ -40,6 +40,7 @@
|
||||
#include <wayland-client.h>
|
||||
|
||||
#include "window.h"
|
||||
#include "shared/helpers.h"
|
||||
|
||||
struct clickdot {
|
||||
struct display *display;
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user