[libvirt PATCH 0/6] src: make virObject inherit from GObject

Daniel P. Berrangé posted 6 patches 6 days ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200519174131.91783-1-berrange@redhat.com
src/admin/libvirt-admin.c               |   7 +-
src/datatypes.c                         |  26 ++++
src/datatypes.h                         |   6 +
src/interface/interface_backend_netcf.c |   7 +-
src/libvirt-domain-checkpoint.c         |   3 +-
src/libvirt-domain-snapshot.c           |   3 +-
src/libvirt-domain.c                    |   2 +-
src/libvirt-host.c                      |   2 +-
src/libvirt-interface.c                 |   2 +-
src/libvirt-network.c                   |   6 +-
src/libvirt-nodedev.c                   |   2 +-
src/libvirt-nwfilter.c                  |   6 +-
src/libvirt-secret.c                    |   3 +-
src/libvirt-storage.c                   |   4 +-
src/libvirt-stream.c                    |   3 +-
src/libvirt.c                           |   4 +-
src/libvirt_qemu_probes.d               |   8 +-
src/qemu/qemu_domain.c                  |   4 +-
src/qemu/qemu_monitor.c                 |  21 +++-
src/qemu/qemu_monitor.h                 |   3 +
src/qemu/qemu_process.c                 |  30 ++---
src/rpc/virnettlscontext.c              |   5 +-
src/test/test_driver.c                  |  15 ++-
src/util/virfdstream.c                  |   6 +-
src/util/virobject.c                    | 150 ++++++++++++++----------
src/util/virobject.h                    |  27 ++---
src/vbox/vbox_common.c                  |  10 +-
27 files changed, 210 insertions(+), 155 deletions(-)

[libvirt PATCH 0/6] src: make virObject inherit from GObject

Posted by Daniel P. Berrangé 6 days ago
This series attempts to make the conversion from virObject to
GObject less dangerous, by making the former inherit from the
latter.

The way we setup inheritance with virObject means we have to
make some moderately gross games with registering virClass
instances as GObjectClass instances. Empirically it seems to
work and pass the basic TCK test suite.

Ultimately virObject should be deleted entirely, so the gross
bits shouldn't live too long.

Daniel P. Berrangé (6):
  qemu: stop checking virObjectUnref return value
  src: make virObjectUnref return void
  test: allocate numa cells separately from driver
  src: don't include ref count in debug messages / probes
  src: don't use VIR_FREE on an object allocation
  src: make virObject inherit from GObject

 src/admin/libvirt-admin.c               |   7 +-
 src/datatypes.c                         |  26 ++++
 src/datatypes.h                         |   6 +
 src/interface/interface_backend_netcf.c |   7 +-
 src/libvirt-domain-checkpoint.c         |   3 +-
 src/libvirt-domain-snapshot.c           |   3 +-
 src/libvirt-domain.c                    |   2 +-
 src/libvirt-host.c                      |   2 +-
 src/libvirt-interface.c                 |   2 +-
 src/libvirt-network.c                   |   6 +-
 src/libvirt-nodedev.c                   |   2 +-
 src/libvirt-nwfilter.c                  |   6 +-
 src/libvirt-secret.c                    |   3 +-
 src/libvirt-storage.c                   |   4 +-
 src/libvirt-stream.c                    |   3 +-
 src/libvirt.c                           |   4 +-
 src/libvirt_qemu_probes.d               |   8 +-
 src/qemu/qemu_domain.c                  |   4 +-
 src/qemu/qemu_monitor.c                 |  21 +++-
 src/qemu/qemu_monitor.h                 |   3 +
 src/qemu/qemu_process.c                 |  30 ++---
 src/rpc/virnettlscontext.c              |   5 +-
 src/test/test_driver.c                  |  15 ++-
 src/util/virfdstream.c                  |   6 +-
 src/util/virobject.c                    | 150 ++++++++++++++----------
 src/util/virobject.h                    |  27 ++---
 src/vbox/vbox_common.c                  |  10 +-
 27 files changed, 210 insertions(+), 155 deletions(-)

-- 
2.24.1

Re: [libvirt PATCH 0/6] src: make virObject inherit from GObject

Posted by Michal Privoznik 5 days ago
On 5/19/20 7:41 PM, Daniel P. Berrangé wrote:
> This series attempts to make the conversion from virObject to
> GObject less dangerous, by making the former inherit from the
> latter.
> 
> The way we setup inheritance with virObject means we have to
> make some moderately gross games with registering virClass
> instances as GObjectClass instances. Empirically it seems to
> work and pass the basic TCK test suite.
> 
> Ultimately virObject should be deleted entirely, so the gross
> bits shouldn't live too long.
> 
> Daniel P. Berrangé (6):
>    qemu: stop checking virObjectUnref return value
>    src: make virObjectUnref return void
>    test: allocate numa cells separately from driver
>    src: don't include ref count in debug messages / probes
>    src: don't use VIR_FREE on an object allocation
>    src: make virObject inherit from GObject
> 
>   src/admin/libvirt-admin.c               |   7 +-
>   src/datatypes.c                         |  26 ++++
>   src/datatypes.h                         |   6 +
>   src/interface/interface_backend_netcf.c |   7 +-
>   src/libvirt-domain-checkpoint.c         |   3 +-
>   src/libvirt-domain-snapshot.c           |   3 +-
>   src/libvirt-domain.c                    |   2 +-
>   src/libvirt-host.c                      |   2 +-
>   src/libvirt-interface.c                 |   2 +-
>   src/libvirt-network.c                   |   6 +-
>   src/libvirt-nodedev.c                   |   2 +-
>   src/libvirt-nwfilter.c                  |   6 +-
>   src/libvirt-secret.c                    |   3 +-
>   src/libvirt-storage.c                   |   4 +-
>   src/libvirt-stream.c                    |   3 +-
>   src/libvirt.c                           |   4 +-
>   src/libvirt_qemu_probes.d               |   8 +-
>   src/qemu/qemu_domain.c                  |   4 +-
>   src/qemu/qemu_monitor.c                 |  21 +++-
>   src/qemu/qemu_monitor.h                 |   3 +
>   src/qemu/qemu_process.c                 |  30 ++---
>   src/rpc/virnettlscontext.c              |   5 +-
>   src/test/test_driver.c                  |  15 ++-
>   src/util/virfdstream.c                  |   6 +-
>   src/util/virobject.c                    | 150 ++++++++++++++----------
>   src/util/virobject.h                    |  27 ++---
>   src/vbox/vbox_common.c                  |  10 +-
>   27 files changed, 210 insertions(+), 155 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal