summary refs log tree commit diff stats
path: root/include/qapi/visitor-impl.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-04-24 10:43:30 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-04-30 06:51:15 +0200
commit8b7ce95b46815f274aed52857260cb180f6fade3 (patch)
treedb04709d24ff071b831592ba8451906721791b6a /include/qapi/visitor-impl.h
parent8e08bf4ea24c3e6e07fab2c1b5bdcc7b104012c4 (diff)
downloadfocaccia-qemu-8b7ce95b46815f274aed52857260cb180f6fade3.tar.gz
focaccia-qemu-8b7ce95b46815f274aed52857260cb180f6fade3.zip
qapi: Fix Visitor contract for start_alternate()
The contract demands v->start_alternate() for input and dealloc
visitors, but visit_start_alternate() actually requires it for input
and clone visitors.  Fix the contract, and delete superfluous
qapi_dealloc_start_alternate().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200424084338.26803-8-armbru@redhat.com>
Diffstat (limited to 'include/qapi/visitor-impl.h')
-rw-r--r--include/qapi/visitor-impl.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/qapi/visitor-impl.h b/include/qapi/visitor-impl.h
index 8ccb3b6c20..252206dc0d 100644
--- a/include/qapi/visitor-impl.h
+++ b/include/qapi/visitor-impl.h
@@ -67,13 +67,12 @@ struct Visitor
     /* Must be set */
     void (*end_list)(Visitor *v, void **list);
 
-    /* Must be set by input and dealloc visitors to visit alternates;
-     * optional for output visitors. */
+    /* Must be set by input and clone visitors to visit alternates */
     void (*start_alternate)(Visitor *v, const char *name,
                             GenericAlternate **obj, size_t size,
                             Error **errp);
 
-    /* Optional, needed for dealloc visitor */
+    /* Optional */
     void (*end_alternate)(Visitor *v, void **obj);
 
     /* Must be set */