[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xend: Avoid use of 'k' specifier to Py_BuildValue(). Its
# HG changeset patch # User Keir Fraser <keir@xxxxxxxxxxxxx> # Date 1174242394 0 # Node ID 2b58c9e325490312eaa4a0ce46ab92be04dfec0f # Parent 7521c87983e0dd1a30a80f68bf3b73765997bbc0 xend: Avoid use of 'k' specifier to Py_BuildValue(). Its implementation is broken until Python v2.4.3. Instead cast the C value to long long and use the 'L' specifier. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- tools/python/xen/lowlevel/xc/xc.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -r 7521c87983e0 -r 2b58c9e32549 tools/python/xen/lowlevel/xc/xc.c --- a/tools/python/xen/lowlevel/xc/xc.c Sun Mar 18 16:49:52 2007 +0000 +++ b/tools/python/xen/lowlevel/xc/xc.c Sun Mar 18 18:26:34 2007 +0000 @@ -314,7 +314,7 @@ static PyObject *pyxc_domain_getinfo(XcO { info_dict = Py_BuildValue( "{s:i,s:i,s:i,s:i,s:i,s:i,s:i,s:i,s:i,s:i" - ",s:k,s:L,s:k,s:i,s:i}", + ",s:L,s:L,s:L,s:i,s:i}", "domid", (int)info[i].domid, "online_vcpus", info[i].nr_online_vcpus, "max_vcpu_id", info[i].max_vcpu_id, @@ -325,9 +325,9 @@ static PyObject *pyxc_domain_getinfo(XcO "paused", info[i].paused, "blocked", info[i].blocked, "running", info[i].running, - "mem_kb", info[i].nr_pages*(XC_PAGE_SIZE/1024), + "mem_kb", (long long)info[i].nr_pages*(XC_PAGE_SIZE/1024), "cpu_time", (long long)info[i].cpu_time, - "maxmem_kb", info[i].max_memkb, + "maxmem_kb", (long long)info[i].max_memkb, "ssidref", (int)info[i].ssidref, "shutdown_reason", info[i].shutdown_reason); pyhandle = PyList_New(sizeof(xen_domain_handle_t)); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |