From f05ddcfbe658834c3ac8054eea5fa6d0bc66d2b6 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sun, 12 Dec 2010 17:27:09 +0100 Subject: s4:web_server/wsgi.c - add missing Python compatibility code --- source4/web_server/wsgi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source4') 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; -- cgit