debuggers.hg

changeset 22287:3a5755249361

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 <gianni.tedesco@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
author Gianni Tedesco <gianni.tedesco@citrix.com>
date Thu Oct 14 12:46:29 2010 +0100 (2010-10-14)
parents 38ad3633ecaf
children 7831b8e5aae2
files tools/python/xen/lowlevel/xl/xl.c
line diff
     1.1 --- a/tools/python/xen/lowlevel/xl/xl.c	Wed Oct 13 12:01:30 2010 +0100
     1.2 +++ b/tools/python/xen/lowlevel/xl/xl.c	Thu Oct 14 12:46:29 2010 +0100
     1.3 @@ -51,6 +51,10 @@
     1.4  
     1.5  #define CLS "ctx"
     1.6  
     1.7 +#if PY_MAJOR_VERSION < 2 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5)
     1.8 +#define Py_ssize_t int
     1.9 +#endif
    1.10 +
    1.11  static PyObject *xl_error_obj;
    1.12  
    1.13  int genwrap__obj_init(PyObject *self, PyObject *args, PyObject *kwds)