On Mon, 23 May 2016 19:54:05 -0600
Yong Bakos <[email protected]> wrote:

> From: Yong Bakos <[email protected]>
> 
> 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 <[email protected]>
> ---
>  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

This looks a little odd to me. autoconf generated config.h also
#defines things to 1 when they are "true".

> 
>  #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

I think the old ordering was left to mimic the original header where
these were pulled out from.

wayland-server-protocol.h depends on some of the function declarations
that used to be below the deprecated block.


Thanks,
pq

Attachment: pgpNDjFJmUh8u.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to