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
@@ -34,6 +34,7 @@
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "compositor.h"
|
||||
#include "shared/helpers.h"
|
||||
|
||||
WL_EXPORT void
|
||||
weston_spring_init(struct weston_spring *spring,
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <linux/input.h>
|
||||
|
||||
#include "compositor.h"
|
||||
#include "shared/helpers.h"
|
||||
|
||||
struct weston_binding {
|
||||
uint32_t key;
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include "compositor.h"
|
||||
#include "shared/helpers.h"
|
||||
|
||||
struct clipboard_source {
|
||||
struct weston_data_source base;
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
#include "compositor.h"
|
||||
#include "cms-helper.h"
|
||||
#include "shared/helpers.h"
|
||||
|
||||
struct cms_colord {
|
||||
struct weston_compositor *ec;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "compositor.h"
|
||||
#include "cms-helper.h"
|
||||
#include "shared/helpers.h"
|
||||
|
||||
struct cms_static {
|
||||
struct weston_compositor *ec;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include "compositor.h"
|
||||
#include "shared/helpers.h"
|
||||
|
||||
struct weston_drag {
|
||||
struct wl_client *client;
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include "pixman-renderer.h"
|
||||
#include "shared/helpers.h"
|
||||
|
||||
#include <linux/input.h>
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "compositor.h"
|
||||
#include "rpi-renderer.h"
|
||||
#include "shared/helpers.h"
|
||||
|
||||
#ifdef ENABLE_EGL
|
||||
#include <EGL/egl.h>
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
#include "compositor.h"
|
||||
#include "screenshooter-server-protocol.h"
|
||||
#include "shared/helpers.h"
|
||||
|
||||
#include "wcap/wcap-decode.h"
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user