From c21c25450819c9bf2d88c52e6ba44df2c28a01a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Dieter=20Walln=C3=B6fer?= Date: Fri, 19 Aug 2011 19:27:32 +0200 Subject: [PATCH] s3:passdb/py_passdb.c - restore Python >= 2.4 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Autobuild-User: Matthias Dieter Wallnöfer Autobuild-Date: Fri Aug 19 21:03:44 CEST 2011 on sn-devel-104 --- source3/passdb/py_passdb.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c index 9192ab3ce78..e23f47578e8 100644 --- a/source3/passdb/py_passdb.c +++ b/source3/passdb/py_passdb.c @@ -25,6 +25,13 @@ #include "passdb.h" #include "secrets.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 -- 2.34.1