[RFC wayland v1 1/1] private, server: Make define consistent, reorder include
Yong Bakos
junk at humanoriented.com
Tue May 24 01:54:05 UTC 2016
From: Yong Bakos <ybakos at humanoriented.com>
wayland-private.h defines WL_HIDE_DEPRECATED with a token-string, which
is unnecessary. Remove the token-string from the define.
wayland-server.h includes wayland-server-protocol.h at the end of the file,
after the ifndef WL_HIDE_DEPRECATED block, but it is not necessary for the
include to follow the ifndef block. Move the include to the top of the file,
for clarity.
Place the use of extern "C" inside the ifndef WL_HIDE_DEPRECATED block, since
an empty extern "C" block would be pointless.
Signed-off-by: Yong Bakos <ybakos at humanoriented.com>
---
src/wayland-private.h | 2 +-
src/wayland-server.h | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/wayland-private.h b/src/wayland-private.h
index 045109b..14baf28 100644
--- a/src/wayland-private.h
+++ b/src/wayland-private.h
@@ -31,7 +31,7 @@
#include <stdarg.h>
#include <stdlib.h>
-#define WL_HIDE_DEPRECATED 1
+#define WL_HIDE_DEPRECATED
#include "wayland-util.h"
diff --git a/src/wayland-server.h b/src/wayland-server.h
index 3124703..156e39d 100644
--- a/src/wayland-server.h
+++ b/src/wayland-server.h
@@ -37,13 +37,14 @@
#define WAYLAND_SERVER_H
#include "wayland-server-core.h"
+#include "wayland-server-protocol.h"
+
+#ifndef WL_HIDE_DEPRECATED
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef WL_HIDE_DEPRECATED
-
struct wl_object {
const struct wl_interface *interface;
const void *implementation;
@@ -90,12 +91,10 @@ void
wl_display_remove_global(struct wl_display *display,
struct wl_global *global) WL_DEPRECATED;
-#endif
-
#ifdef __cplusplus
}
#endif
-#include "wayland-server-protocol.h"
+#endif
#endif
--
2.7.2
More information about the wayland-devel
mailing list