From: Gianni Tedesco Date: Thu, 14 Oct 2010 11:46:29 +0000 (+0100) Subject: pyxl: fix build of python xl binding for python < 2.5 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11401 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=92d4a8cf459ea72bf0c8300dc6f3a897f0d62633;p=xen.git 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. Signed-off-by: Gianni Tedesco Signed-off-by: Stefano Stabellini committer: Stefano Stabellini --- diff --git a/tools/python/xen/lowlevel/xl/xl.c b/tools/python/xen/lowlevel/xl/xl.c index 6ac2cc42ff..7ab66f4f52 100644 --- a/tools/python/xen/lowlevel/xl/xl.c +++ b/tools/python/xen/lowlevel/xl/xl.c @@ -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)