[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 29.5/35] fixup! qapi: Canonicalize missing object
From: |
Eric Blake |
Subject: |
[Qemu-devel] [PATCH v8 29.5/35] fixup! qapi: Canonicalize missing object to :empty |
Date: |
Wed, 23 Dec 2015 10:54:34 -0700 |
[original message is fine; here's a couple more related changes
that can be squashed in]
Signed-off-by: Eric Blake <address@hidden>
---
scripts/qapi-commands.py | 10 +++++-----
scripts/qapi.py | 3 +--
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index 632350d..9d455c3 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -29,11 +29,11 @@ def gen_call(name, arg_type, ret_type):
ret = ''
argstr = ''
- if arg_type:
- for memb in arg_type.members:
- if memb.optional:
- argstr += 'has_%s, ' % c_name(memb.name)
- argstr += '%s, ' % c_name(memb.name)
+ assert arg_type
+ for memb in arg_type.members:
+ if memb.optional:
+ argstr += 'has_%s, ' % c_name(memb.name)
+ argstr += '%s, ' % c_name(memb.name)
lhs = ''
if ret_type:
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 2da43a5..e9006e4 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -1612,8 +1612,7 @@ extern const char *const %(c_name)s_lookup[];
def gen_params(arg_type, extra):
- if not arg_type:
- return extra
+ assert arg_type
assert not arg_type.variants
ret = ''
sep = ''
--
2.4.3
- [Qemu-devel] [PATCH v8 31/35] qapi: Rework deallocation of partial struct, (continued)
- [Qemu-devel] [PATCH v8 31/35] qapi: Rework deallocation of partial struct, Eric Blake, 2015/12/21
- [Qemu-devel] [PATCH v8 34/35] qapi: Change visit_type_FOO() to no longer return partial objects, Eric Blake, 2015/12/21
- [Qemu-devel] [PATCH v8 32/35] qapi: Split visit_end_struct() into pieces, Eric Blake, 2015/12/21
- [Qemu-devel] [PATCH v8 35/35] RFC: qapi: Adjust layout of FooList types, Eric Blake, 2015/12/21
- [Qemu-devel] [PATCH v8 23/35] qmp: Tighten output visitor rules, Eric Blake, 2015/12/21
- [Qemu-devel] [PATCH v8 33/35] qapi: Simplify semantics of visit_next_list(), Eric Blake, 2015/12/21
- [Qemu-devel] [PATCH v8 16/35] qapi: Swap 'name' in visit_* callbacks to match public API, Eric Blake, 2015/12/21
- [Qemu-devel] [PATCH v8 30/35] qapi-visit: Unify struct and union visit, Eric Blake, 2015/12/21
- [Qemu-devel] [PATCH v8 26/35] qapi: Add type.is_empty() helper, Eric Blake, 2015/12/21
- [Qemu-devel] [PATCH v8 29/35] qapi: Canonicalize missing object to :empty, Eric Blake, 2015/12/21
- [Qemu-devel] [PATCH v8 29.5/35] fixup! qapi: Canonicalize missing object to :empty,
Eric Blake <=
- [Qemu-devel] [PATCH v8 15/35] qom: Swap 'name' next to visitor in ObjectPropertyAccessor, Eric Blake, 2015/12/21
- [Qemu-devel] [PATCH v8 14/35] qapi: Swap visit_* arguments for consistent 'name' placement, Eric Blake, 2015/12/21