]> xenbits.xensource.com Git - libvirt.git/commit
src: add support for g_autoptr with virObject instances
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 4 Oct 2019 16:14:10 +0000 (17:14 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Mon, 14 Oct 2019 09:54:42 +0000 (10:54 +0100)
commit667ff797e8eb8d82f30ab430216a8d2eef6b915a
tree9349c6c948b55074c0c6d4e90cb18c7a6425c572
parent44e7f029159ed701b4a1739ac711507ee53790ed
src: add support for g_autoptr with virObject instances

Libvirt currently uses the VIR_AUTOUNREF macro for auto cleanup of
virObject instances. GLib approaches things differently with GObject,
reusing their g_autoptr() concept.

This introduces support for g_autoptr() with virObject, to facilitate
the conversion to GObject.

Only virObject classes which are currently used with VIR_AUTOREF are
updated. Any others should be converted to GObject before introducing
use of autocleanup.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
21 files changed:
docs/hacking.html.in
src/conf/capabilities.h
src/conf/domain_capabilities.h
src/conf/domain_conf.h
src/conf/snapshot_conf.h
src/conf/storage_capabilities.h
src/datatypes.h
src/libxl/libxl_conf.h
src/qemu/qemu_blockjob.h
src/qemu/qemu_capabilities.h
src/qemu/qemu_conf.h
src/util/virhostdev.h
src/util/viridentity.h
src/util/virmdev.h
src/util/virobject.h
src/util/virpci.h
src/util/virresctrl.h
src/util/virscsi.h
src/util/virscsivhost.h
src/util/virstoragefile.h
src/util/virusb.h