summary refs log tree commit diff stats
path: root/include/qapi/visitor-impl.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2017-03-03 13:32:35 +0100
committerMarkus Armbruster <armbru@redhat.com>2017-03-05 09:14:19 +0100
commita8aec6de2ac1a5e36989fdfba29067b361009b75 (patch)
treea6c6c8a5fcff76f81a7ed167e1c1aa9a77ae107d /include/qapi/visitor-impl.h
parenta9fc37f6bc3f2ab90585cb16493da9f6dcfbfbcf (diff)
downloadfocaccia-qemu-a8aec6de2ac1a5e36989fdfba29067b361009b75.tar.gz
focaccia-qemu-a8aec6de2ac1a5e36989fdfba29067b361009b75.zip
qapi: Drop string input visitor method optional()
visit_optional() is to be called only between visit_start_struct() and
visit_end_struct().  Visitors that don't support struct visits,
i.e. don't implement start_struct(), end_struct(), have no use for it.
Clarify documentation.

The string input visitor doesn't support struct visits.  Its
parse_optional() is therefore useless.  Drop it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1488544368-30622-16-git-send-email-armbru@redhat.com>
Diffstat (limited to 'include/qapi/visitor-impl.h')
-rw-r--r--include/qapi/visitor-impl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/qapi/visitor-impl.h b/include/qapi/visitor-impl.h
index 8bd47ee4bb..962ba1df35 100644
--- a/include/qapi/visitor-impl.h
+++ b/include/qapi/visitor-impl.h
@@ -102,8 +102,8 @@ struct Visitor
     /* Must be set to visit explicit null values.  */
     void (*type_null)(Visitor *v, const char *name, Error **errp);
 
-    /* Must be set for input visitors, optional otherwise.  The core
-     * takes care of the return type in the public interface. */
+    /* Must be set for input visitors to visit structs, optional otherwise.
+       The core takes care of the return type in the public interface. */
     void (*optional)(Visitor *v, const char *name, bool *present);
 
     /* Must be set */