WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xend: Avoid use of 'k' specifier to Py_Bu

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Avoid use of 'k' specifier to Py_BuildValue(). Its
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Mar 2007 09:50:12 -0700
Delivery-date: Tue, 20 Mar 2007 09:50:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: Avoid use of 'k' specifier to Py_BuildValue(). Its, Xen patchbot-unstable <=