From dbd930cb243d33c84fce8dfff84fde02d9e792f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Dieter=20Walln=C3=B6fer?= Date: Sat, 19 Nov 2011 12:59:01 +0100 Subject: [PATCH] socket_wrapper/py_socket_wrapper.c - include Python 2.4 compatiblity code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Autobuild-User: Matthias Dieter Wallnöfer Autobuild-Date: Sat Nov 19 14:53:43 CET 2011 on sn-devel-104 --- lib/socket_wrapper/py_socket_wrapper.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/socket_wrapper/py_socket_wrapper.c b/lib/socket_wrapper/py_socket_wrapper.c index 405a43a81dd..5c8af03124a 100644 --- a/lib/socket_wrapper/py_socket_wrapper.c +++ b/lib/socket_wrapper/py_socket_wrapper.c @@ -45,6 +45,13 @@ #include "system/network.h" #include "socket_wrapper.h" +/* There's no Py_ssize_t in 2.4, apparently */ +#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 5 +typedef int Py_ssize_t; +typedef inquiry lenfunc; +typedef intargfunc ssizeargfunc; +#endif + #ifndef Py_RETURN_NONE #define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None #endif -- 2.11.4.GIT