From a933b7f5d10d9f00b3df5e80dedef3f235c34e4e Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 5 Dec 2013 16:08:40 +0000 Subject: override: Replace Py{Int,Long}_FromLong with helpers Replace use of the PyInt_FromLong and PyLong_FromLongLong with libvirt_{int,uint,longlong,ulonglong}Wrap helpers. This isolates the need for Python3 specific code in one place. Signed-off-by: Daniel P. Berrange --- libvirt-lxc-override.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libvirt-lxc-override.c') diff --git a/libvirt-lxc-override.c b/libvirt-lxc-override.c index 60b41d8..ba97551 100644 --- a/libvirt-lxc-override.c +++ b/libvirt-lxc-override.c @@ -89,7 +89,7 @@ libvirt_lxc_virDomainLxcOpenNamespace(PyObject *self ATTRIBUTE_UNUSED, for (i = 0; i < c_retval; i++) { PyObject *item = NULL; - if ((item = PyInt_FromLong(fdlist[i])) == NULL) + if ((item = libvirt_intWrap(fdlist[i])) == NULL) goto error; if (PyList_Append(py_retval, item) < 0) { -- cgit v1.2.1