git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
136a5d7
)
s4:web_server/wsgi.c - add missing Python compatibility code
author
Matthias Dieter Wallnöfer
<mdw@samba.org>
Sun, 12 Dec 2010 16:27:09 +0000
(17:27 +0100)
committer
Matthias Dieter Wallnöfer
<mdw@samba.org>
Sun, 12 Dec 2010 16:27:09 +0000
(17:27 +0100)
source4/web_server/wsgi.c
patch
|
blob
|
history
diff --git
a/source4/web_server/wsgi.c
b/source4/web_server/wsgi.c
index e1e211872843df1d862aa514e2f71a43fd5e23dc..84252458f03a2864ae08b0f1bfcb0a4d9f68e0e9 100644
(file)
--- 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;