I was hoping to quickly re-send the qemu_driver cleanups I've
sent some time ago, now using Glib. I started by attempting to
change the first VIR_AUTOUNREF() call in qemu_driver.c to
g_autoptr(), which happens to be a virStorageSourcePtr type,
then I realized that it wasn't that simple.
Following up the instructions found on commit 16121a88a7, I started
the conversion. Then 'make check' started to fail because some
calls to virObjectRef/virObjectUnref were still remaining
in the code, messing up stuff related with mirrorChain in
qemu_blockjob.c. Turns out it was easier to burn through all the
instances and change them to use GLib.
This is being sent as RFC because x-I am aware that docs/hacking.html
mentions that we shouldn't mix up certain GLib macros with Libvirt
ones, thus I am uncertain of whether I have messed up or not.
'make check' works, did a few sanity checks with libvirtd as
well.
Hopefully this is somewhere near the mark. I intend to do such
convertions from time to time, based on the cleanups I wanted to
make in the qemu_driver file prior to the GLib introduction.
Daniel Henrique Barboza (1):
util: convert virStorageSource class to use GObject
src/conf/domain_conf.c | 13 ++---
src/conf/snapshot_conf.c | 3 +-
src/qemu/qemu_blockjob.c | 43 ++++++--------
src/qemu/qemu_domain.c | 6 +-
src/qemu/qemu_driver.c | 14 ++---
src/qemu/qemu_hotplug.c | 3 +-
src/qemu/qemu_migration.c | 2 +-
src/storage/storage_backend_gluster.c | 2 +-
src/storage/storage_util.c | 4 +-
src/util/virstoragefile.c | 84 +++++++++++++--------------
src/util/virstoragefile.h | 9 ++-
tests/qemublocktest.c | 6 +-
tests/virstoragetest.c | 12 ++--
13 files changed, 98 insertions(+), 103 deletions(-)
--
2.21.0