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:
Markus Armbruster 2019-09-13 22:13:41 +02:00
parent 9b4416bfc1
commit 675b214bc6
11 changed files with 19 additions and 25 deletions

View file

@ -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('''