[PATCH wayland] scanner: Remove unused forward decs from client protocol

Pekka Paalanen ppaalanen at gmail.com
Fri May 20 07:36:15 UTC 2016


On Thu, 19 May 2016 20:31:16 -0600
Yong Bakos <junk at humanoriented.com> wrote:

> From: Yong Bakos <ybakos at humanoriented.com>
> 
> wayland-client-protocol.h had forward declarations for wl_client and
> wl_resource, yet nothing on the client side references these types.
> 
> Add a 'side' condition to only generate these forward declarations in the
> server protocol header.
> 
> Signed-off-by: Yong Bakos <ybakos at humanoriented.com>
> ---
>  src/scanner.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/scanner.c b/src/scanner.c
> index 037ebdb..5f06e8e 100644
> --- a/src/scanner.c
> +++ b/src/scanner.c
> @@ -1477,13 +1477,13 @@ emit_header(struct protocol *protocol, enum side side)
>  	       "#include \"%s\"\n\n"
>  	       "#ifdef  __cplusplus\n"
>  	       "extern \"C\" {\n"
> -	       "#endif\n"
> -	       "\n"
> -	       "struct wl_client;\n"
> -	       "struct wl_resource;\n\n",
> +	       "#endif\n\n",
>  	       protocol->uppercase_name, s,
>  	       protocol->uppercase_name, s,
>  	       get_include_name(protocol->core_headers, side));
> +	if (side == SERVER)
> +		printf("struct wl_client;\n"
> +		       "struct wl_resource;\n\n");
>  
>  	emit_mainpage_blurb(protocol, side);
>  

Reviewed-by: <pekka.paalanen at collabora.co.uk>


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160520/d4743954/attachment.sig>


More information about the wayland-devel mailing list