]> git.proxmox.com Git - mirror_qemu.git/blobdiff - include/qapi/visitor.h
qapi: Make input visitors detect unvisited list tails
[mirror_qemu.git] / include / qapi / visitor.h
index 7c91a50a4c65f2099f0762b5d06f5c8235b8260a..1a1b62012b8e493cda237a021896fa097f4596fa 100644 (file)
@@ -369,6 +369,19 @@ void visit_start_list(Visitor *v, const char *name, GenericList **list,
  */
 GenericList *visit_next_list(Visitor *v, GenericList *tail, size_t size);
 
+/*
+ * Prepare for completing a list visit.
+ *
+ * @errp obeys typical error usage, and reports failures such as
+ * unvisited list tail remaining in the input stream.
+ *
+ * Should be called prior to visit_end_list() if all other
+ * intermediate visit steps were successful, to allow the visitor one
+ * last chance to report errors.  May be skipped on a cleanup path,
+ * where there is no need to check for further errors.
+ */
+void visit_check_list(Visitor *v, Error **errp);
+
 /*
  * Complete a list visit started earlier.
  *