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:
Jon Cruz
2015-06-15 15:37:10 -07:00
committed by Bryce Harrington
parent d618f688d5
commit 867d50eea7
29 changed files with 64 additions and 12 deletions
+1
View File
@@ -34,6 +34,7 @@
#include <fcntl.h>
#include "compositor.h"
#include "shared/helpers.h"
WL_EXPORT void
weston_spring_init(struct weston_spring *spring,
+1
View File
@@ -29,6 +29,7 @@
#include <linux/input.h>
#include "compositor.h"
#include "shared/helpers.h"
struct weston_binding {
uint32_t key;
+1
View File
@@ -33,6 +33,7 @@
#include <sys/uio.h>
#include "compositor.h"
#include "shared/helpers.h"
struct clipboard_source {
struct weston_data_source base;
+1
View File
@@ -36,6 +36,7 @@
#include "compositor.h"
#include "cms-helper.h"
#include "shared/helpers.h"
struct cms_colord {
struct weston_compositor *ec;
+1
View File
@@ -30,6 +30,7 @@
#include "compositor.h"
#include "cms-helper.h"
#include "shared/helpers.h"
struct cms_static {
struct weston_compositor *ec;
-4
View File
@@ -45,10 +45,6 @@ extern "C" {
#include "zalloc.h"
#include "timeline-object.h"
#define container_of(ptr, type, member) ({ \
const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
struct weston_transform {
struct weston_matrix matrix;
struct wl_list link;
+1
View File
@@ -32,6 +32,7 @@
#include <assert.h>
#include "compositor.h"
#include "shared/helpers.h"
struct weston_drag {
struct wl_client *client;
+1
View File
@@ -38,6 +38,7 @@
#include "compositor.h"
#include "libinput-device.h"
#include "shared/helpers.h"
#define DEFAULT_AXIS_STEP_DISTANCE wl_fixed_from_int(10)
+1
View File
@@ -37,6 +37,7 @@
#include "launcher-util.h"
#include "libinput-seat.h"
#include "libinput-device.h"
#include "shared/helpers.h"
static const char default_seat[] = "seat0";
static const char default_seat_name[] = "default";
+1
View File
@@ -32,6 +32,7 @@
#include <assert.h>
#include "pixman-renderer.h"
#include "shared/helpers.h"
#include <linux/input.h>
+1
View File
@@ -37,6 +37,7 @@
#include "compositor.h"
#include "rpi-renderer.h"
#include "shared/helpers.h"
#ifdef ENABLE_EGL
#include <EGL/egl.h>
+1
View File
@@ -40,6 +40,7 @@
#include <wayland-client.h>
#include "compositor.h"
#include "shared/helpers.h"
#include "shared/os-compatibility.h"
#include "fullscreen-shell-client-protocol.h"
+1
View File
@@ -35,6 +35,7 @@
#include "compositor.h"
#include "screenshooter-server-protocol.h"
#include "shared/helpers.h"
#include "wcap/wcap-decode.h"
+1
View File
@@ -35,6 +35,7 @@
#include "compositor.h"
#include "text-server-protocol.h"
#include "input-method-server-protocol.h"
#include "shared/helpers.h"
struct text_input_manager;
struct input_method;
+1
View File
@@ -29,6 +29,7 @@
#include "compositor.h"
#include "text-cursor-position-server-protocol.h"
#include "shared/helpers.h"
static void
weston_zoom_frame_z(struct weston_animation *animation,