]> git.proxmox.com Git - mirror_qemu.git/commit
qapi: Make input visitors detect unvisited list tails
authorMarkus Armbruster <armbru@redhat.com>
Fri, 3 Mar 2017 12:32:45 +0000 (13:32 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Sun, 5 Mar 2017 08:14:20 +0000 (09:14 +0100)
commita4a1c70dc759e5b81627e96564f344ab43ea86eb
tree56d44358c6e76c57a01aed7ee789b68965dcc2ff
parent86ca0dbe04d8eeebf460b56111c9af125e14528f
qapi: Make input visitors detect unvisited list tails

Fix the design flaw demonstrated in the previous commit: new method
check_list() lets input visitors report that unvisited input remains
for a list, exactly like check_struct() lets them report that
unvisited input remains for a struct or union.

Implement the method for the qobject input visitor (straightforward),
and the string input visitor (less so, due to the magic list syntax
there).  The opts visitor's list magic is even more impenetrable, and
all I can do there today is a stub with a FIXME comment.  No worse
than before.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1488544368-30622-26-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
12 files changed:
hw/ppc/spapr_drc.c
include/qapi/visitor-impl.h
include/qapi/visitor.h
qapi/opts-visitor.c
qapi/qapi-visit-core.c
qapi/qobject-input-visitor.c
qapi/string-input-visitor.c
qapi/trace-events
scripts/qapi-visit.py
tests/test-opts-visitor.c
tests/test-qobject-input-visitor.c
tests/test-string-input-visitor.c