Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- src/libvirt_private.syms | 1 - src/util/virobject.c | 14 -------------- src/util/virobject.h | 15 --------------- 3 files changed, 30 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 7d62df8086..0da02bb8bd 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2636,7 +2636,6 @@ virClassForObjectRWLockable; virClassIsDerivedFrom; virClassName; virClassNew; -virObjectAutoUnref; virObjectFreeCallback; virObjectFreeHashData; virObjectIsClass; diff --git a/src/util/virobject.c b/src/util/virobject.c index 33feeb659a..c5363308d8 100644 --- a/src/util/virobject.c +++ b/src/util/virobject.c @@ -367,20 +367,6 @@ virObjectUnref(void *anyobj) } -/** - * virObjectAutoUnref: - * - * Helper used by VIR_AUTOUNREF - */ -void -virObjectAutoUnref(void *objptr) -{ - virObjectPtr *obj = objptr; - virObjectUnref(*obj); - *obj = NULL; -} - - /** * virObjectRef: * @anyobj: any instance of virObjectPtr diff --git a/src/util/virobject.h b/src/util/virobject.h index 773a009f5e..7cb3457021 100644 --- a/src/util/virobject.h +++ b/src/util/virobject.h @@ -109,21 +109,6 @@ virObjectNew(virClassPtr klass) bool virObjectUnref(void *obj); -void -virObjectAutoUnref(void *objptr); - -/** - * VIR_AUTOUNREF: - * @type: type of an virObject subclass to be unref'd automatically - * - * DEPRECATED: Use g_autoptr(type) instead - * - * Declares a variable of @type which will be automatically unref'd when - * control goes out of the scope. - */ -#define VIR_AUTOUNREF(type) \ - __attribute__((cleanup(virObjectAutoUnref))) type - G_DEFINE_AUTOPTR_CLEANUP_FUNC(virObject, virObjectUnref); void * -- 2.19.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list