Move un-namespaced container_of into private header
authorKristian Høgsberg <krh@bitplanet.net>
Sat, 20 Oct 2012 03:06:53 +0000 (23:06 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Sat, 20 Oct 2012 03:06:53 +0000 (23:06 -0400)
src/data-device.c
src/wayland-private.h
src/wayland-shm.c
src/wayland-util.h

index 363a90d..4255c13 100644 (file)
@@ -25,6 +25,7 @@
 #include <unistd.h>
 #include <stdio.h>
 
+#include "wayland-private.h"
 #include "wayland-server.h"
 
 static void
index 0d617a7..1b98ce2 100644 (file)
 
 #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_ZOMBIE_OBJECT ((void *) 2)
 
 #define WL_MAP_SERVER_SIDE 0
index 90c4cf7..47c126b 100644 (file)
@@ -33,6 +33,7 @@
 #include <sys/mman.h>
 #include <unistd.h>
 
+#include "wayland-private.h"
 #include "wayland-server.h"
 
 struct wl_shm_pool {
index 7c8f563..4b1eca0 100644 (file)
@@ -39,10 +39,6 @@ extern "C" {
 #define WL_EXPORT
 #endif
 
-#define container_of(ptr, type, member) ({                             \
-       const __typeof__( ((type *)0)->member ) *__mptr = (ptr);        \
-       (type *)( (char *)__mptr - offsetof(type,member) );})
-
 struct wl_message {
        const char *name;
        const char *signature;