summaryrefslogtreecommitdiffstats
path: root/libvir.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2006-11-15 19:40:00 +0000
committerDaniel P. Berrange <berrange@redhat.com>2006-11-15 19:40:00 +0000
commitc4726cbadbd3cc45ab8873a807d624890729502c (patch)
treed7de1ef877f9eba185215b86f4ce596e40476010 /libvir.c
parente8a0109538b79471154739ee341b941170cf76f9 (diff)
downloadlibvirt-python-v6-c4726cbadbd3cc45ab8873a807d624890729502c.tar.gz
libvirt-python-v6-c4726cbadbd3cc45ab8873a807d624890729502c.tar.xz
libvirt-python-v6-c4726cbadbd3cc45ab8873a807d624890729502c.zip
Fix unsigned long wraparound in python binding
Diffstat (limited to 'libvir.c')
-rw-r--r--libvir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libvir.c b/libvir.c
index a7b98dc..6d14fb2 100644
--- a/libvir.c
+++ b/libvir.c
@@ -261,8 +261,8 @@ libvirt_virDomainGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
}
py_retval = PyList_New(5);
PyList_SetItem(py_retval, 0, libvirt_intWrap((int) info.state));
- PyList_SetItem(py_retval, 1, libvirt_longWrap((long) info.maxMem));
- PyList_SetItem(py_retval, 2, libvirt_longWrap((long) info.memory));
+ PyList_SetItem(py_retval, 1, libvirt_ulongWrap(info.maxMem));
+ PyList_SetItem(py_retval, 2, libvirt_ulongWrap(info.memory));
PyList_SetItem(py_retval, 3, libvirt_intWrap((int) info.nrVirtCpu));
PyList_SetItem(py_retval, 4,
libvirt_longlongWrap((unsigned long long) info.cpuTime));