summaryrefslogtreecommitdiff
path: root/lib/socket_wrapper
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-11-19 12:59:01 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-11-19 14:53:43 +0100
commitdbd930cb243d33c84fce8dfff84fde02d9e792f5 (patch)
tree2eff08959db1358102235c2e44afcc8eea1c97a7 /lib/socket_wrapper
parent82b1702284ba2bb61b23e1f14ce9145d896c36c0 (diff)
downloadsamba-dbd930cb243d33c84fce8dfff84fde02d9e792f5.tar.gz
samba-dbd930cb243d33c84fce8dfff84fde02d9e792f5.tar.bz2
samba-dbd930cb243d33c84fce8dfff84fde02d9e792f5.zip
socket_wrapper/py_socket_wrapper.c - include Python 2.4 compatiblity code
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sat Nov 19 14:53:43 CET 2011 on sn-devel-104
Diffstat (limited to 'lib/socket_wrapper')
-rw-r--r--lib/socket_wrapper/py_socket_wrapper.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/socket_wrapper/py_socket_wrapper.c b/lib/socket_wrapper/py_socket_wrapper.c
index 405a43a81d..5c8af03124 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