]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix build of python bindings on Python 2.4
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 8 May 2013 14:42:03 +0000 (15:42 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 9 May 2013 16:02:11 +0000 (17:02 +0100)
The PyDict_Next method on Python <= 2.4 used 'int' instead
of "Py_ssize_t" for the 'pos' parameter

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
python/libvirt-override.c

index 856789a2acf21944a0cef634cc020592cfe3d944..fd9ebb89c0558f67539aedd982b725abba869de0 100644 (file)
@@ -152,7 +152,11 @@ setPyVirTypedParameter(PyObject *info,
                        const virTypedParameterPtr params, int nparams)
 {
     PyObject *key, *value;
+#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 4
+    int pos = 0;
+#else
     Py_ssize_t pos = 0;
+#endif
     virTypedParameterPtr temp = NULL, ret = NULL;
     Py_ssize_t size;
     int i;