[libvirt] [PATCH v2 07/23] src: add support for g_autoptr with virObject instances

Ján Tomko jtomko at redhat.com
Tue Oct 8 14:17:35 UTC 2019


On Mon, Oct 07, 2019 at 06:14:09PM +0100, Daniel P. Berrangé wrote:
>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.
>
>Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
>---
> docs/hacking.html.in            |  5 +++++
> src/conf/capabilities.h         |  3 +++
> src/conf/domain_capabilities.h  |  3 +++
> src/conf/domain_conf.h          |  3 +++
> src/conf/snapshot_conf.h        |  3 +++
> src/conf/storage_capabilities.h |  3 +++
> src/datatypes.h                 | 15 +++++++++++++++
> src/libxl/libxl_conf.h          |  2 ++
> src/qemu/qemu_blockjob.h        |  1 +
> src/qemu/qemu_capabilities.h    |  2 ++
> src/qemu/qemu_conf.h            |  3 +++
> src/util/virhostdev.h           |  3 +++
> src/util/viridentity.h          |  2 ++
> src/util/virmdev.h              |  3 +++
> src/util/virobject.h            |  4 ++++
> src/util/virpci.h               |  3 +++
> src/util/virresctrl.h           |  4 ++++
> src/util/virscsi.h              |  3 +++
> src/util/virscsivhost.h         |  3 +++
> src/util/virstoragefile.h       |  2 ++
> src/util/virusb.h               |  3 +++
> 21 files changed, 73 insertions(+)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20191008/e2ba4230/attachment-0001.sig>


More information about the libvir-list mailing list