[PATCH 2/3] conf: moment: Export helpers to create the virDomainMoment wrapper

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

 



Export 'virDomainMomentObjNew' and 'virDomainMomentObjFree' and define
the latter as autoptr cleanup function for 'virDomainMomentObj'.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/conf/virdomainmomentobjlist.c | 4 ++--
 src/conf/virdomainmomentobjlist.h | 8 ++++++++
 src/libvirt_private.syms          | 2 ++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/conf/virdomainmomentobjlist.c b/src/conf/virdomainmomentobjlist.c
index 60f7eec106..8993c2310b 100644
--- a/src/conf/virdomainmomentobjlist.c
+++ b/src/conf/virdomainmomentobjlist.c
@@ -205,7 +205,7 @@ virDomainMomentMoveChildren(virDomainMomentObj *from,
 }


-static virDomainMomentObj *
+virDomainMomentObj *
 virDomainMomentObjNew(void)
 {
     virDomainMomentObj *moment;
@@ -218,7 +218,7 @@ virDomainMomentObjNew(void)
 }


-static void
+void
 virDomainMomentObjFree(virDomainMomentObj *moment)
 {
     if (!moment)
diff --git a/src/conf/virdomainmomentobjlist.h b/src/conf/virdomainmomentobjlist.h
index e42f9a7e9e..d2ab3b46b1 100644
--- a/src/conf/virdomainmomentobjlist.h
+++ b/src/conf/virdomainmomentobjlist.h
@@ -50,6 +50,14 @@ struct _virDomainMomentObj {
     virDomainMomentObj *first_child; /* NULL if no children */
 };

+virDomainMomentObj *
+virDomainMomentObjNew(void);
+
+void
+virDomainMomentObjFree(virDomainMomentObj *moment);
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainMomentObj, virDomainMomentObjFree);
+
 int
 virDomainMomentForEachChild(virDomainMomentObj *moment,
                             virHashIterator iter,
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index ee14b99d88..5b76e66e61 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1175,6 +1175,8 @@ virDomainMomentDropParent;
 virDomainMomentForEachChild;
 virDomainMomentForEachDescendant;
 virDomainMomentMoveChildren;
+virDomainMomentObjFree;
+virDomainMomentObjNew;


 # conf/virdomainobjlist.h
-- 
2.31.1




[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