summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYong Bakos <ybakos@humanoriented.com>2016-05-19 20:31:16 -0600
committerBryce Harrington <bryce@osg.samsung.com>2016-05-20 14:58:59 -0700
commit97fef4821327b5daecbee9c6cb0fc1de93181cff (patch)
tree4a6ab86d68958069a72737fb1b0221d005507a48
parentcc11b493426c46e86aee0bcd7c92ca9e9e23030d (diff)
downloadwayland-97fef4821327b5daecbee9c6cb0fc1de93181cff.tar.gz
scanner: Remove unused forward decs from client protocol
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@humanoriented.com> Reviewed-by: <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
-rw-r--r--src/scanner.c8
1 files 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);