mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
datatypes: Declare g_autoptr cleanup functions for more public objects
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@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
da95bcb6b2
commit
e6a5592787
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user