[PATCH wayland 3/8] scanner: use c99 initializers for the request/events arrays
Emil Velikov
emil.l.velikov at gmail.com
Thu Jun 14 15:49:40 UTC 2018
From: Emil Velikov <emil.velikov at collabora.com>
Makes things a bit less magical, should you be looking in the file.
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
src/scanner.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/scanner.c b/src/scanner.c
index 4b49593..fb3c808 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -1675,7 +1675,7 @@ emit_messages(struct wl_list *message_list,
interface->name, suffix);
wl_list_for_each(m, message_list, link) {
- printf("\t{ \"%s\", \"", m->name);
+ printf("\t{ .name = \"%s\", .signature = \"", m->name);
if (m->since > 1)
printf("%d", m->since);
@@ -1714,7 +1714,7 @@ emit_messages(struct wl_list *message_list,
break;
}
}
- printf("\", types + %d },\n", m->type_index);
+ printf("\", .types = &types[%d] },\n", m->type_index);
}
printf("};\n\n");
--
2.16.0
More information about the wayland-devel
mailing list