Some public objects (like virDomain, virInterface, and so on) are
missing g_autoptr() cleanup functions. Provide missing
declarations. Note, this is only for our internal use - hence
datatypes.h.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/datatypes.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/datatypes.h b/src/datatypes.h
index f8b1a83407..c5a7ece786 100644
--- a/src/datatypes.h
+++ b/src/datatypes.h
@@ -604,6 +604,9 @@ struct _virDomain {
unsigned char uuid[VIR_UUID_BUFLEN]; /* the domain unique identifier */
};
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomain, virObjectUnref);
+
+
/**
* _virNetwork:
*
@@ -647,6 +650,9 @@ struct _virInterface {
char *mac; /* the interface MAC address */
};
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(virInterface, virObjectUnref);
+
+
/**
* _virStoragePool:
*
@@ -706,6 +712,7 @@ struct _virNodeDevice {
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNodeDevice, virObjectUnref);
+
/**
* _virSecret:
*
@@ -751,6 +758,8 @@ struct _virDomainCheckpoint {
virDomainPtr domain;
};
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainCheckpoint, virObjectUnref);
+
/**
* _virDomainSnapshot
@@ -763,6 +772,9 @@ struct _virDomainSnapshot {
virDomainPtr domain;
};
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainSnapshot, virObjectUnref);
+
+
/**
* _virNWFilter:
*
@@ -775,6 +787,8 @@ struct _virNWFilter {
unsigned char uuid[VIR_UUID_BUFLEN]; /* the network filter unique identifier */
};
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNWFilter, virObjectUnref);
+
/**
* _virNWFilterBinding:
@@ -788,6 +802,8 @@ struct _virNWFilterBinding {
char *filtername; /* the network filter name */
};
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNWFilterBinding, virObjectUnref);
+
/*
* Helper APIs for allocating new object instances
--
2.43.2