virObject is a base struct that manages reference-counting. structs
that need the ability of reference-counting can inherit from
virObject and implement ref/unref interface easily.
The goal of this series is to make reference-counting easy to use,
and improve the current libvir reference-counting mechanism. The
plan is to update all existing structs that use reference-counting
to use virObject if virObject is acceptable.
Patch 1 implements virObject, patch 2 is an illstration of usage of
virObject. This series is in draft stage, any comments are welcome.
Hu Tao (2):
Add virObject.
qemu: use virObject to manages reference-counting for qemu monitor
src/Makefile.am | 1 +
src/libvirt_private.syms | 5 ++
src/qemu/qemu_domain.c | 26 +----------
src/qemu/qemu_monitor.c | 106 ++++++++++++++++++++++++++--------------------
src/qemu/qemu_monitor.h | 4 +-
src/util/object.c | 55 ++++++++++++++++++++++++
src/util/object.h | 39 +++++++++++++++++
7 files changed, 164 insertions(+), 72 deletions(-)
create mode 100644 src/util/object.c
create mode 100644 src/util/object.h
--
1.7.3.1
--
Thanks,
Hu Tao