mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31: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)
|
virDomainMomentObjNew(void)
|
||||||
{
|
{
|
||||||
virDomainMomentObj *moment;
|
virDomainMomentObj *moment;
|
||||||
@ -218,7 +218,7 @@ virDomainMomentObjNew(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
void
|
||||||
virDomainMomentObjFree(virDomainMomentObj *moment)
|
virDomainMomentObjFree(virDomainMomentObj *moment)
|
||||||
{
|
{
|
||||||
if (!moment)
|
if (!moment)
|
||||||
|
@ -50,6 +50,14 @@ struct _virDomainMomentObj {
|
|||||||
virDomainMomentObj *first_child; /* NULL if no children */
|
virDomainMomentObj *first_child; /* NULL if no children */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
virDomainMomentObj *
|
||||||
|
virDomainMomentObjNew(void);
|
||||||
|
|
||||||
|
void
|
||||||
|
virDomainMomentObjFree(virDomainMomentObj *moment);
|
||||||
|
|
||||||
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainMomentObj, virDomainMomentObjFree);
|
||||||
|
|
||||||
int
|
int
|
||||||
virDomainMomentForEachChild(virDomainMomentObj *moment,
|
virDomainMomentForEachChild(virDomainMomentObj *moment,
|
||||||
virHashIterator iter,
|
virHashIterator iter,
|
||||||
|
@ -1175,6 +1175,8 @@ virDomainMomentDropParent;
|
|||||||
virDomainMomentForEachChild;
|
virDomainMomentForEachChild;
|
||||||
virDomainMomentForEachDescendant;
|
virDomainMomentForEachDescendant;
|
||||||
virDomainMomentMoveChildren;
|
virDomainMomentMoveChildren;
|
||||||
|
virDomainMomentObjFree;
|
||||||
|
virDomainMomentObjNew;
|
||||||
|
|
||||||
|
|
||||||
# conf/virdomainobjlist.h
|
# conf/virdomainobjlist.h
|
||||||
|
Loading…
Reference in New Issue
Block a user