mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06: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:
parent
9b4416bfc1
commit
675b214bc6
11 changed files with 19 additions and 25 deletions
|
@ -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('''
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue