[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.