[PATCH 3/3] Add a wl_global_get_user_data function

Jason Ekstrand jason at jlekstrand.net
Wed Jul 17 19:58:48 PDT 2013


Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
 src/wayland-server.c | 6 ++++++
 src/wayland-server.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/wayland-server.c b/src/wayland-server.c
index a0d1019..122e05e 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -820,6 +820,12 @@ wl_global_create(struct wl_display *display,
 	return global;
 }
 
+WL_EXPORT void *
+wl_global_get_user_data(struct wl_global *global)
+{
+	return global->data;
+}
+
 WL_EXPORT void
 wl_global_destroy(struct wl_global *global)
 {
diff --git a/src/wayland-server.h b/src/wayland-server.h
index 31a2957..d494a66 100644
--- a/src/wayland-server.h
+++ b/src/wayland-server.h
@@ -111,6 +111,7 @@ struct wl_global *wl_global_create(struct wl_display *display,
 				   const struct wl_interface *interface,
 				   int version,
 				   void *data, wl_global_bind_func_t bind);
+void *wl_global_get_user_data(struct wl_global *global);
 void wl_global_destroy(struct wl_global *global);
 
 struct wl_client *wl_client_create(struct wl_display *display, int fd);
-- 
1.8.3.1



More information about the wayland-devel mailing list