All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gianni Tedesco <gianni.tedesco@citrix.com>
To: Xen Devel <xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: "Jiang, Yunhong" <yunhong.jiang@intel.com>
Subject: [PATCH]: pyxl: fix build of python xl binding for python < 2.5
Date: Wed, 13 Oct 2010 17:56:29 +0100	[thread overview]
Message-ID: <1286988989.12843.566.camel@qabil.uk.xensource.com> (raw)

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)

             reply	other threads:[~2010-10-13 16:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13 16:56 Gianni Tedesco [this message]
2010-10-14 11:47 ` [PATCH]: pyxl: fix build of python xl binding for python < 2.5 Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286988989.12843.566.camel@qabil.uk.xensource.com \
    --to=gianni.tedesco@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=yunhong.jiang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.