[libvirt PATCH v2 03/15] define g_autoptr cleanup function for virNetworkDHCPLease

Laine Stump posted 15 patches 4 years, 4 months ago
[libvirt PATCH v2 03/15] define g_autoptr cleanup function for virNetworkDHCPLease
Posted by Laine Stump 4 years, 4 months ago
virNetworkDHCPLease and virNetworkDHCPLeaseFree() are declared in the
public API file libvirt-network.h, and we can't pollute that with glib
macro invocations, so put this in src/datatypes.h next to the other
virNetwork items.

Signed-off-by: Laine Stump <laine@redhat.com>
---
 src/datatypes.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/datatypes.h b/src/datatypes.h
index d58429ad6c..ade3779e43 100644
--- a/src/datatypes.h
+++ b/src/datatypes.h
@@ -635,6 +635,8 @@ struct _virNetworkPort {
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetworkPort, virObjectUnref);
 
+/* virNetworkDHCPLease is defined in the public API - libvirt-network.h */
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetworkDHCPLease, virNetworkDHCPLeaseFree);
 
 /**
 * _virInterface:
-- 
2.25.4

Re: [libvirt PATCH v2 03/15] define g_autoptr cleanup function for virNetworkDHCPLease
Posted by Ján Tomko 4 years, 4 months ago
On a Tuesday in 2020, Laine Stump wrote:
>virNetworkDHCPLease and virNetworkDHCPLeaseFree() are declared in the
>public API file libvirt-network.h, and we can't pollute that with glib
>macro invocations, so put this in src/datatypes.h next to the other
>virNetwork items.
>
>Signed-off-by: Laine Stump <laine@redhat.com>
>---
> src/datatypes.h | 2 ++
> 1 file changed, 2 insertions(+)
>

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

Jano