mirror of
https://github.com/mii443/qemu.git
synced 2025-08-23 15:48:20 +00:00
qapi: Permit 'boxed' with empty type
We reject empty types with 'boxed': true. We don't really need that to work, but making it work is actually simpler than rejecting it, so do that. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190913201349.24332-9-armbru@redhat.com>
This commit is contained in:
@ -30,7 +30,7 @@ def gen_call(name, arg_type, boxed, ret_type):
|
||||
|
||||
argstr = ''
|
||||
if boxed:
|
||||
assert arg_type and not arg_type.is_empty()
|
||||
assert arg_type
|
||||
argstr = '&arg, '
|
||||
elif arg_type:
|
||||
assert not arg_type.variants
|
||||
@ -96,7 +96,7 @@ def gen_marshal_decl(name):
|
||||
|
||||
|
||||
def gen_marshal(name, arg_type, boxed, ret_type):
|
||||
have_args = arg_type and not arg_type.is_empty()
|
||||
have_args = boxed or (arg_type and not arg_type.is_empty())
|
||||
|
||||
ret = mcgen('''
|
||||
|
||||
|
Reference in New Issue
Block a user