qapi: qapi-visit.py, fix list handling for union types
commitc664aef551714e91b7d83a28617b6e767db30d11
authorMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 10 May 2013 22:46:01 +0000 (10 17:46 -0500)
committerLuiz Capitulino <lcapitulino@redhat.com>
Thu, 23 May 2013 13:44:20 +0000 (23 09:44 -0400)
tree83d9276e2dce3abcd4ecbb83e895e9390701f913
parentc0afa9c5f717d0ebf10c70c305974ebbffe4c71f
qapi: qapi-visit.py, fix list handling for union types

Currently we assume non-list types when generating visitor routines for
union types. This is broken, since values like ['Type'] need to mapped
to 'TypeList'.

We already have a type_name() function to handle this that we use for
generating struct visitors, so use that here as well.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Amos Kong <akong@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
scripts/qapi-visit.py