This is needed to make C++ programs that include wayland-server.h build:
C++ does not allow conversions from data pointers to function pointers.
---
This is the cleanest solution, imho. But if there are problems related to
Wayland internals, or libffi, or something else, there are two other
options:
use a union { void *obj; void (* const *func)(); }; in wl_resource_init()
in wayland-server.h to convert between the two (really ugly imho) or 
uninline wl_resource_init() and put the implementation somewhere the c++
compiler doesn't see.

 src/wayland-util.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wayland-util.h b/src/wayland-util.h
index 257a5d1..4728aaa 100644
--- a/src/wayland-util.h
+++ b/src/wayland-util.h
@@ -56,7 +56,7 @@ struct wl_interface {
 
 struct wl_object {
        const struct wl_interface *interface;
-       void (* const * implementation)(void);
+       const void *implementation;
        uint32_t id;
 };
 
-- 
1.8.2

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to