]> git.proxmox.com Git - mirror_qemu.git/commit - qapi/opts-visitor.c
qapi: Swap 'name' in visit_* callbacks to match public API
authorEric Blake <eblake@redhat.com>
Fri, 29 Jan 2016 13:48:56 +0000 (06:48 -0700)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 8 Feb 2016 16:29:56 +0000 (17:29 +0100)
commit0b2a0d6bb2446060944061e53e87d0c7addede79
treecad44bc332e2b6032155f8fe3731be4b134aefe1
parentd7bce9999df85c56c8cb1fcffd944d51bff8ff48
qapi: Swap 'name' in visit_* callbacks to match public API

As explained in the previous patches, matching argument order of
'name, &value' to JSON's "name":value makes sense.  However,
while the last two patches were easy with Coccinelle, I ended up
doing this one all by hand.  Now all the visitor callbacks match
the main interface.

The compiler is able to enforce that all clients match the changed
interface in visitor-impl.h, even where two pointers are being
swapped, because only one of the two pointers is const (if that
were not the case, then C's looseness on treating 'char *' like
'void *' would have made review a bit harder).

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <1454075341-13658-21-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
include/qapi/visitor-impl.h
qapi/opts-visitor.c
qapi/qapi-dealloc-visitor.c
qapi/qapi-visit-core.c
qapi/qmp-input-visitor.c
qapi/qmp-output-visitor.c
qapi/string-input-visitor.c
qapi/string-output-visitor.c