[waffle] [PATCH] wayland: Wrap wl_proxy_marshal_constructor_versioned v2
Michel Dänzer
michel at daenzer.net
Thu Apr 14 08:23:07 UTC 2016
From: Michel Dänzer <michel.daenzer at amd.com>
Fixes build failure due to wl_proxy_marshal_constructor_versioned being
unresolved when building against current wayland.
This API was introduced in wayland 1.9.91 by commit 557032e3 ("Track
protocol object versions inside wl_proxy."). The waffle code doesn't
reference wl_proxy_marshal_constructor_versioned directly but
indirectly via wayland-scanner.
v2:
* Add paragraph about how wl_proxy_marshal_constructor_versioned was
introduced. (Emil Velikov)
* Only resolve wl_proxy_marshal_constructor_versioned with wayland >=
1.9.91.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/waffle/wayland/wayland_wrapper.c | 5 +++++
src/waffle/wayland/wayland_wrapper.h | 8 ++++++++
2 files changed, 13 insertions(+)
diff --git a/src/waffle/wayland/wayland_wrapper.c b/src/waffle/wayland/wayland_wrapper.c
index 6ffd5a9..fb66f9a 100644
--- a/src/waffle/wayland/wayland_wrapper.c
+++ b/src/waffle/wayland/wayland_wrapper.c
@@ -106,6 +106,11 @@ wayland_wrapper_init(void)
RETRIEVE_WL_CLIENT_SYMBOL(wl_proxy_add_listener);
RETRIEVE_WL_CLIENT_SYMBOL(wl_proxy_marshal);
RETRIEVE_WL_CLIENT_SYMBOL(wl_proxy_marshal_constructor);
+#if WAYLAND_VERSION_MAJOR == 1 && \
+ (WAYLAND_VERSION_MINOR > 9 || \
+ (WAYLAND_VERSION_MINOR == 9 && WAYLAND_VERSION_MICRO >= 91))
+ RETRIEVE_WL_CLIENT_SYMBOL(wl_proxy_marshal_constructor_versioned);
+#endif
#undef RETRIEVE_WL_CLIENT_SYMBOL
error:
diff --git a/src/waffle/wayland/wayland_wrapper.h b/src/waffle/wayland/wayland_wrapper.h
index 40a581a..3282587 100644
--- a/src/waffle/wayland/wayland_wrapper.h
+++ b/src/waffle/wayland/wayland_wrapper.h
@@ -75,6 +75,13 @@ struct wl_proxy *
const struct wl_interface *interface,
...);
+struct wl_proxy *
+(*wfl_wl_proxy_marshal_constructor_versioned)(struct wl_proxy *proxy,
+ uint32_t opcode,
+ const struct wl_interface *interface,
+ uint32_t version,
+ ...);
+
#ifdef _WAYLAND_CLIENT_H
#error Do not include wayland-client.h ahead of wayland_wrapper.h
#endif
@@ -92,3 +99,4 @@ struct wl_proxy *
#define wl_proxy_add_listener (*wfl_wl_proxy_add_listener)
#define wl_proxy_marshal (*wfl_wl_proxy_marshal)
#define wl_proxy_marshal_constructor (*wfl_wl_proxy_marshal_constructor)
+#define wl_proxy_marshal_constructor_versioned (*wfl_wl_proxy_marshal_constructor_versioned)
--
2.8.0.rc3
More information about the waffle
mailing list