[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/8] qapi: qapi-visit.py, fix list handling for unio
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 2/8] qapi: qapi-visit.py, fix list handling for union types |
Date: |
Wed, 8 May 2013 18:33:51 -0500 |
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 <address@hidden>
---
scripts/qapi-visit.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py
index a276540..4c4de4b 100644
--- a/scripts/qapi-visit.py
+++ b/scripts/qapi-visit.py
@@ -174,7 +174,7 @@ void visit_type_%(name)s(Visitor *m, %(name)s ** obj, const
char *name, Error **
''',
abbrev = de_camel_case(name).upper(),
enum = c_fun(de_camel_case(key),False).upper(),
- c_type=members[key],
+ c_type=type_name(members[key]),
c_name=c_fun(key))
ret += mcgen('''
--
1.7.9.5
- [Qemu-devel] [PATCH 0/8] qapi: add support for lists of native types, Michael Roth, 2013/05/08
- [Qemu-devel] [PATCH 1/8] qapi: qapi-types.py, native list support, Michael Roth, 2013/05/08
- [Qemu-devel] [PATCH 2/8] qapi: qapi-visit.py, fix list handling for union types,
Michael Roth <=
- [Qemu-devel] [PATCH 3/8] qapi: qapi-visit.py, native list support, Michael Roth, 2013/05/08
- [Qemu-devel] [PATCH 4/8] qapi: enable generation of native list code, Michael Roth, 2013/05/08
- [Qemu-devel] [PATCH 5/8] qapi: fix leak in unit tests, Michael Roth, 2013/05/08
- [Qemu-devel] [PATCH 6/8] qapi: add native list coverage for visitor serialization tests, Michael Roth, 2013/05/08
- [Qemu-devel] [PATCH 7/8] qapi: add native list coverage for QMP output visitor tests, Michael Roth, 2013/05/08
- [Qemu-devel] [PATCH 8/8] qapi: add native list coverage for QMP input visitor tests, Michael Roth, 2013/05/08
- Re: [Qemu-devel] [PATCH 0/8] qapi: add support for lists of native types, Laszlo Ersek, 2013/05/09