mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
conf: moment: Export helpers to create the virDomainMoment wrapper
Export 'virDomainMomentObjNew' and 'virDomainMomentObjFree' and define the latter as autoptr cleanup function for 'virDomainMomentObj'. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
6e9fa631ef
commit
6ba3334222
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -1175,6 +1175,8 @@ virDomainMomentDropParent;
|
||||
virDomainMomentForEachChild;
|
||||
virDomainMomentForEachDescendant;
|
||||
virDomainMomentMoveChildren;
|
||||
virDomainMomentObjFree;
|
||||
virDomainMomentObjNew;
|
||||
|
||||
|
||||
# conf/virdomainobjlist.h
|
||||
|
Loading…
Reference in New Issue
Block a user