[PATCH 5/7] Make the scanner generate version 1 wl_interface structures

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


Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
 src/scanner.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/scanner.c b/src/scanner.c
index 6d2eddd..b3f5bf5 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -1118,7 +1118,7 @@ emit_code(struct protocol *protocol)
 
 		printf("WL_EXPORT const struct wl_interface "
 		       "%s_interface = {\n"
-		       "\t\"%s\", %d,\n",
+		       "\t\"%s\", (1 << 16) | %d,\n",
 		       i->name, i->name, i->version);
 
 		if (!wl_list_empty(&i->request_list))
@@ -1133,6 +1133,7 @@ emit_code(struct protocol *protocol)
 		else
 			printf("\t0, NULL,\n");
 
+		printf("\tNULL,\n");
 		printf("};\n\n");
 	}
 }
-- 
1.8.1



More information about the wayland-devel mailing list