[PATCH libvirt-python v3 34/40] virTypedParams* API appeared in 1.0.2 and used in 1.1.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Doug Goldstein <cardoe@xxxxxxxxxx>

When building against versions of libvirt prior to 1.0.2, we can not
provide wrappers for virTypedParams* APIs. In addition we don't need
to have the helper APIs until 1.1.0 when the first API we wrap starts
to use them.
---
 libvirt-override.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libvirt-override.c b/libvirt-override.c
index dc04152..c345dfe 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -254,7 +254,9 @@ cleanup:
     return NULL;
 }
 
-
+/* While these appeared in libvirt in 1.0.2, we only
+ * need them in the python from 1.1.0 onwards */
+#if LIBVIR_CHECK_VERSION(1, 1, 0)
 typedef struct {
     const char *name;
     int type;
@@ -406,6 +408,7 @@ cleanup:
     virTypedParamsFree(params, n);
     return ret;
 }
+#endif /* LIBVIR_CHECK_VERSION(1, 1, 0) */
 
 
 /*
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]