scanner: prepend protocol name to types symbol

When doing unity builds via meson (example project:
https://github.com/swaywm/sway) multiple source files are glued together
via #include directives. Having every wayland-scanner generated source
file have an identifier named '*types[]' will lead to errors in these
unity builds if two or more of these are joined.

Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
This commit is contained in:
Marty E. Plummer 2019-05-11 09:53:01 -05:00
parent a89a5349af
commit 9f004d8b0f
No known key found for this signature in database
GPG key ID: 47BC0C716C0747F2
5 changed files with 140 additions and 140 deletions

View file

@ -42,7 +42,7 @@
extern const struct wl_interface another_intf_interface;
extern const struct wl_interface intf_not_here_interface;
static const struct wl_interface *types[] = {
static const struct wl_interface *small_test_types[] = {
NULL,
&intf_not_here_interface,
NULL,
@ -54,13 +54,13 @@ static const struct wl_interface *types[] = {
};
static const struct wl_message intf_A_requests[] = {
{ "rq1", "sun", types + 0 },
{ "rq2", "nsiufho", types + 1 },
{ "destroy", "", types + 0 },
{ "rq1", "sun", small_test_types + 0 },
{ "rq2", "nsiufho", small_test_types + 1 },
{ "destroy", "", small_test_types + 0 },
};
static const struct wl_message intf_A_events[] = {
{ "hey", "", types + 0 },
{ "hey", "", small_test_types + 0 },
};
WL_PRIVATE const struct wl_interface intf_A_interface = {