summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-12-12 17:27:09 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-12-12 17:27:09 +0100
commitf05ddcfbe658834c3ac8054eea5fa6d0bc66d2b6 (patch)
treeb32dca0dd884732def59bf888df30a1fc4e3b923
parent136a5d7a267ea21550208162c6ccb82c08d1e142 (diff)
downloadsamba-f05ddcfbe658834c3ac8054eea5fa6d0bc66d2b6.tar.gz
samba-f05ddcfbe658834c3ac8054eea5fa6d0bc66d2b6.tar.bz2
samba-f05ddcfbe658834c3ac8054eea5fa6d0bc66d2b6.zip
s4:web_server/wsgi.c - add missing Python compatibility code
-rw-r--r--source4/web_server/wsgi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c
index e1e2118728..84252458f0 100644
--- a/source4/web_server/wsgi.c
+++ b/source4/web_server/wsgi.c
@@ -28,6 +28,17 @@
#include "lib/tls/tls.h"
#include "lib/tsocket/tsocket.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
+
typedef struct {
PyObject_HEAD
struct websrv_context *web;