]> git.proxmox.com Git - mirror_qemu.git/commit - qemu-io.c
qobject: Replace qobject_incref/QINCREF qobject_decref/QDECREF
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 19 Apr 2018 15:01:43 +0000 (17:01 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 4 May 2018 06:27:53 +0000 (08:27 +0200)
commitcb3e7f08aeaab0ab13e629ce8496dca150a449ba
tree189830b93bea625aac19f86f26dc4b04cd99f5a3
parent3d3eacaeccaab718ea0e2ddaa578bfae9e311c59
qobject: Replace qobject_incref/QINCREF qobject_decref/QDECREF

Now that we can safely call QOBJECT() on QObject * as well as its
subtypes, we can have macros qobject_ref() / qobject_unref() that work
everywhere instead of having to use QINCREF() / QDECREF() for QObject
and qobject_incref() / qobject_decref() for its subtypes.

The replacement is mechanical, except I broke a long line, and added a
cast in monitor_qmp_cleanup_req_queue_locked().  Unlike
qobject_decref(), qobject_unref() doesn't accept void *.

Note that the new macros evaluate their argument exactly once, thus no
need to shout them.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180419150145.24795-4-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Rebased, semantic conflict resolved, commit message improved]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
94 files changed:
block.c
block/blkdebug.c
block/blkverify.c
block/crypto.c
block/gluster.c
block/iscsi.c
block/nbd.c
block/nfs.c
block/null.c
block/nvme.c
block/parallels.c
block/qapi.c
block/qcow.c
block/qcow2.c
block/qed.c
block/quorum.c
block/rbd.c
block/sheepdog.c
block/snapshot.c
block/ssh.c
block/vdi.c
block/vhdx.c
block/vpc.c
block/vvfat.c
block/vxhs.c
blockdev.c
docs/devel/qapi-code-gen.txt
hw/i386/acpi-build.c
hw/ppc/spapr_drc.c
hw/usb/xen-usb.c
include/qapi/qmp/qnull.h
include/qapi/qmp/qobject.h
migration/migration.c
migration/qjson.c
monitor.c
qapi/qapi-dealloc-visitor.c
qapi/qmp-dispatch.c
qapi/qobject-input-visitor.c
qapi/qobject-output-visitor.c
qemu-img.c
qemu-io.c
qga/main.c
qmp.c
qobject/json-parser.c
qobject/qdict.c
qobject/qjson.c
qobject/qlist.c
qom/object.c
qom/object_interfaces.c
scripts/coccinelle/qobject.cocci
scripts/qapi/events.py
target/ppc/translate_init.c
target/s390x/cpu_models.c
tests/ahci-test.c
tests/check-qdict.c
tests/check-qjson.c
tests/check-qlist.c
tests/check-qlit.c
tests/check-qnull.c
tests/check-qnum.c
tests/check-qobject.c
tests/check-qstring.c
tests/cpu-plug-test.c
tests/device-introspect-test.c
tests/drive_del-test.c
tests/libqos/libqos.c
tests/libqos/pci-pc.c
tests/libqtest.c
tests/machine-none-test.c
tests/migration-test.c
tests/numa-test.c
tests/pvpanic-test.c
tests/q35-test.c
tests/qmp-test.c
tests/qom-test.c
tests/tco-test.c
tests/test-char.c
tests/test-keyval.c
tests/test-netfilter.c
tests/test-qemu-opts.c
tests/test-qga.c
tests/test-qmp-cmds.c
tests/test-qmp-event.c
tests/test-qobject-input-visitor.c
tests/test-qobject-output-visitor.c
tests/test-visitor-serialization.c
tests/test-x86-cpuid-compat.c
tests/tmp105-test.c
tests/vhost-user-test.c
tests/virtio-net-test.c
tests/vmgenid-test.c
tests/wdt_ib700-test.c
util/keyval.c
util/qemu-config.c