]> git.proxmox.com Git - mirror_qemu.git/commit - target/i386/cpu.c
qom: Swap 'name' next to visitor in ObjectPropertyAccessor
authorEric Blake <eblake@redhat.com>
Fri, 29 Jan 2016 13:48:55 +0000 (06:48 -0700)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 8 Feb 2016 16:29:56 +0000 (17:29 +0100)
commitd7bce9999df85c56c8cb1fcffd944d51bff8ff48
treec58182b775b0a02781f7818b9c8d32ba7923840d
parent51e72bc1dd6ace6e91d675f41a1f09bd00ab8043
qom: Swap 'name' next to visitor in ObjectPropertyAccessor

Similar to the previous patch, it's nice to have all functions
in the tree that involve a visitor and a name for conversion to
or from QAPI to consistently stick the 'name' parameter next
to the Visitor parameter.

Done by manually changing include/qom/object.h and qom/object.c,
then running this Coccinelle script and touching up the fallout
(Coccinelle insisted on adding some trailing whitespace).

    @ rule1 @
    identifier fn;
    typedef Object, Visitor, Error;
    identifier obj, v, opaque, name, errp;
    @@
     void fn
    - (Object *obj, Visitor *v, void *opaque, const char *name,
    + (Object *obj, Visitor *v, const char *name, void *opaque,
       Error **errp) { ... }

    @@
    identifier rule1.fn;
    expression obj, v, opaque, name, errp;
    @@
     fn(obj, v,
    -   opaque, name,
    +   name, opaque,
        errp)

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <1454075341-13658-20-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
28 files changed:
backends/hostmem.c
bootdevice.c
hw/acpi/ich9.c
hw/core/machine.c
hw/core/qdev-properties-system.c
hw/core/qdev-properties.c
hw/core/qdev.c
hw/i386/pc.c
hw/ide/qdev.c
hw/intc/xics.c
hw/isa/lpc_ich9.c
hw/mem/pc-dimm.c
hw/misc/edu.c
hw/misc/tmp105.c
hw/net/ne2000-isa.c
hw/pci-host/piix.c
hw/pci-host/q35.c
hw/ppc/spapr_drc.c
hw/usb/dev-storage.c
hw/virtio/virtio-balloon.c
include/qom/object.h
memory.c
net/dump.c
net/filter-buffer.c
qom/object.c
target-i386/cpu.c
target-ppc/translate_init.c
tests/test-qdev-global-props.c