Add version information to wl_message signatures.

This commit adds version information to wl_message signatures and a
wl_message_get_since function to retrieve.  The since version comes in the
form of a (possible) integer at the begining of the message.  If the
message starts with an integer, then it specifies the "since" version of
that message.  Messages present in version one do not get this "since"
information.  In this way we can run-time detect the version information
for a structure on a per-message basis.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Jason Ekstrand 2013-06-27 20:09:19 -05:00 committed by Kristian Høgsberg
parent d94a8722cb
commit d35b6278c0
3 changed files with 50 additions and 12 deletions

View file

@ -1033,6 +1033,10 @@ emit_messages(struct wl_list *message_list,
wl_list_for_each(m, message_list, link) {
printf("\t{ \"%s\", \"", m->name);
if (m->since > 1)
printf("%d", m->since);
wl_list_for_each(a, &m->arg_list, link) {
if (is_nullable_type(a) && a->nullable)
printf("?");