summaryrefslogtreecommitdiffstats
path: root/scripts/qapi/commands.py
diff options
context:
space:
mode:
authorMarkus Armbruster2019-09-13 22:13:41 +0200
committerMarkus Armbruster2019-09-24 14:07:22 +0200
commit675b214bc6ba2c1d8ac499e339a8cb99c7f23c7c (patch)
treee8dd67e031288e45927b128d21d687143b7aac6d /scripts/qapi/commands.py
parentqapi: Drop support for escape sequences other than \\ (diff)
downloadqemu-675b214bc6ba2c1d8ac499e339a8cb99c7f23c7c.tar.gz
qemu-675b214bc6ba2c1d8ac499e339a8cb99c7f23c7c.tar.xz
qemu-675b214bc6ba2c1d8ac499e339a8cb99c7f23c7c.zip
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>
Diffstat (limited to 'scripts/qapi/commands.py')
-rw-r--r--scripts/qapi/commands.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py
index b929e07be4..7e3dd1068a 100644
--- a/scripts/qapi/commands.py
+++ b/scripts/qapi/commands.py
@@ -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('''