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-devel

[Xen-devel] [PATCH]: pyxl: fix build of python xl binding for python < 2

To: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]: pyxl: fix build of python xl binding for python < 2.5
From: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Date: Wed, 13 Oct 2010 17:56:29 +0100
Cc: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Delivery-date: Wed, 13 Oct 2010 09:57:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
The python C API introduced Py_ssize_t in version 2.5. Prior to this
int's were used instead. Fix the build by way of a heinous preprocessor
macro.

diff -r 38ad3633ecaf tools/python/xen/lowlevel/xl/xl.c
--- a/tools/python/xen/lowlevel/xl/xl.c Wed Oct 13 12:01:30 2010 +0100
+++ b/tools/python/xen/lowlevel/xl/xl.c Wed Oct 13 17:51:44 2010 +0100
@@ -51,6 +51,10 @@
 
 #define CLS "ctx"
 
+#if PY_MAJOR_VERSION < 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5)
+#define Py_ssize_t int
+#endif
+
 static PyObject *xl_error_obj;
 
 int genwrap__obj_init(PyObject *self, PyObject *args, PyObject *kwds)



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>