summaryrefslogtreecommitdiffstats
path: root/qapi
diff options
context:
space:
mode:
authorMarkus Armbruster2020-04-24 10:43:29 +0200
committerMarkus Armbruster2020-04-30 06:51:15 +0200
commit8e08bf4ea24c3e6e07fab2c1b5bdcc7b104012c4 (patch)
treee3f489babc1f3891cf2c3d4523b46e7c7d32bf8e /qapi
parentqapi: Polish prose in visitor.h (diff)
downloadqemu-8e08bf4ea24c3e6e07fab2c1b5bdcc7b104012c4.tar.gz
qemu-8e08bf4ea24c3e6e07fab2c1b5bdcc7b104012c4.tar.xz
qemu-8e08bf4ea24c3e6e07fab2c1b5bdcc7b104012c4.zip
qapi: Assert incomplete object occurs only in dealloc visitor
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20200424084338.26803-7-armbru@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/qapi-visit-core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c
index 5365561b07..d4aac206cf 100644
--- a/qapi/qapi-visit-core.c
+++ b/qapi/qapi-visit-core.c
@@ -142,6 +142,11 @@ bool visit_is_input(Visitor *v)
return v->type == VISITOR_INPUT;
}
+bool visit_is_dealloc(Visitor *v)
+{
+ return v->type == VISITOR_DEALLOC;
+}
+
void visit_type_int(Visitor *v, const char *name, int64_t *obj, Error **errp)
{
assert(obj);