[PATCH 1/7] Make a #define for WL_CLOSURE_MAX_ARGS instead of a magic number.

Jason Ekstrand jason at jlekstrand.net
Fri Feb 1 08:09:42 PST 2013


Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
 src/wayland-private.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/wayland-private.h b/src/wayland-private.h
index 4ec9896..ecd7f17 100644
--- a/src/wayland-private.h
+++ b/src/wayland-private.h
@@ -39,6 +39,7 @@
 #define WL_MAP_SERVER_SIDE 0
 #define WL_MAP_CLIENT_SIDE 1
 #define WL_SERVER_ID_START 0xff000000
+#define WL_CLOSURE_MAX_ARGS 20
 
 struct wl_map {
 	struct wl_array client_entries;
@@ -76,9 +77,9 @@ int wl_connection_queue(struct wl_connection *connection,
 struct wl_closure {
 	int count;
 	const struct wl_message *message;
-	ffi_type *types[20];
+	ffi_type *types[WL_CLOSURE_MAX_ARGS];
 	ffi_cif cif;
-	void *args[20];
+	void *args[WL_CLOSURE_MAX_ARGS];
 	uint32_t *start;
 	struct wl_list link;
 	struct wl_proxy *proxy;
-- 
1.8.1



More information about the wayland-devel mailing list