diff options
Diffstat (limited to 'scripts/qapi-types.py')
| -rw-r--r-- | scripts/qapi-types.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index 0306a884c3..f194beaae4 100644 --- a/scripts/qapi-types.py +++ b/scripts/qapi-types.py @@ -124,11 +124,14 @@ def gen_variants(variants): for var in variants.variants: # Ugly special case for simple union TODO get rid of it simple_union_type = var.simple_union_type() - typ = simple_union_type or var.type + if simple_union_type: + typ = simple_union_type.c_type() + else: + typ = var.type.c_unboxed_type() ret += mcgen(''' %(c_type)s %(c_name)s; ''', - c_type=typ.c_type(is_unboxed=not simple_union_type), + c_type=typ, c_name=c_name(var.name)) ret += mcgen(''' |