From: Matthias Dieter Wallnöfer Date: Sat, 19 Nov 2011 11:59:01 +0000 (+0100) Subject: socket_wrapper/py_socket_wrapper.c - include Python 2.4 compatiblity code X-Git-Tag: ldb-1.1.4~201 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=dbd930cb243d33c84fce8dfff84fde02d9e792f5;p=samba.git socket_wrapper/py_socket_wrapper.c - include Python 2.4 compatiblity code Autobuild-User: Matthias Dieter Wallnöfer Autobuild-Date: Sat Nov 19 14:53:43 CET 2011 on sn-devel-104 --- 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