[PATCH 5/7] domain_conf.h: add autoptr cleanup func to virDomainXMLOptionPtr

Daniel Henrique Barboza posted 7 patches 4 years, 2 months ago
There is a newer version of this series
[PATCH 5/7] domain_conf.h: add autoptr cleanup func to virDomainXMLOptionPtr
Posted by Daniel Henrique Barboza 4 years, 2 months ago
This will enable code cleanups on code that still relies on
virObjectUnref() this pointer manually.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 src/conf/domain_conf.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index ab9a7d66f8..0ecd3803db 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -3214,6 +3214,7 @@ struct _virDomainXMLOption {
     /* Snapshot postparse callbacks */
     virDomainMomentPostParseCallback momentPostParse;
 };
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(virDomainXMLOption, virObjectUnref);
 
 struct virDomainDefPostParseDeviceIteratorData {
     virDomainXMLOption *xmlopt;
-- 
2.31.1

Re: [PATCH 5/7] domain_conf.h: add autoptr cleanup func to virDomainXMLOptionPtr
Posted by Ján Tomko 4 years, 2 months ago
On a Thursday in 2021, Daniel Henrique Barboza wrote:
>This will enable code cleanups on code that still relies on
>virObjectUnref() this pointer manually.
>
>Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
>---
> src/conf/domain_conf.h | 1 +
> 1 file changed, 1 insertion(+)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano