All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: pyxl: fix build of python xl binding for python < 2.5
@ 2010-10-13 16:56 Gianni Tedesco
  2010-10-14 11:47 ` Stefano Stabellini
  0 siblings, 1 reply; 2+ messages in thread
From: Gianni Tedesco @ 2010-10-13 16:56 UTC (permalink / raw)
  To: Xen Devel, Ian Jackson; +Cc: Jiang, Yunhong

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH]: pyxl: fix build of python xl binding for python < 2.5
  2010-10-13 16:56 [PATCH]: pyxl: fix build of python xl binding for python < 2.5 Gianni Tedesco
@ 2010-10-14 11:47 ` Stefano Stabellini
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Stabellini @ 2010-10-14 11:47 UTC (permalink / raw)
  To: Gianni Tedesco; +Cc: Xen Devel, Ian Jackson, Jiang, Yunhong

On Wed, 13 Oct 2010, Gianni Tedesco wrote:
> 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.

applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-10-14 11:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-13 16:56 [PATCH]: pyxl: fix build of python xl binding for python < 2.5 Gianni Tedesco
2010-10-14 11:47 ` Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.