On 07/31/2012 10:58 AM, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> > > Make qemuAgentPtr and qemuMonitorPtr types use the virObject APIs > for reference counting > > Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> > --- > src/qemu/qemu_agent.c | 86 ++++++++++++++++++----------------------- > src/qemu/qemu_agent.h | 3 -- > src/qemu/qemu_domain.c | 22 +++++------ > src/qemu/qemu_monitor.c | 97 ++++++++++++++++++++--------------------------- > src/qemu/qemu_monitor.h | 3 -- > 5 files changed, 89 insertions(+), 122 deletions(-) These diffstats are showing that this is a good move. > @@ -791,12 +778,13 @@ qemuAgentOpen(virDomainObjPtr vm, > VIR_EVENT_HANDLE_WRITABLE : > 0), > qemuAgentIO, > - mon, qemuAgentUnwatch)) < 0) { > + mon, > + (virFreeCallback)virObjectUnref)) < 0) { Should virobject.h provide something like static inline void virObjectFreeCallback(void *opaque) { virObjectUnref(opaque); } just so that we don't have to cast virObjectUnref in so many places? ACK. -- Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list