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:
Michal Privoznik 2024-04-18 09:19:52 +02:00
parent da95bcb6b2
commit e6a5592787

View File

@ -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