socket_wrapper/py_socket_wrapper.c - include Python 2.4 compatiblity code
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 19 Nov 2011 11:59:01 +0000 (12:59 +0100)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 19 Nov 2011 13:53:43 +0000 (14:53 +0100)
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Nov 19 14:53:43 CET 2011 on sn-devel-104

lib/socket_wrapper/py_socket_wrapper.c

index 405a43a81dde515e4c2aeddb3cab6432edef6130..5c8af03124a0aed3c28e22a51e98fec4354d8f27 100644 (file)
 #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