[PATCH 1/4] datatypes: Declare g_autoptr cleanup functions for more public objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux