s3:passdb/py_passdb.c - restore Python >= 2.4 compatibility
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 19 Aug 2011 17:27:32 +0000 (19:27 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 19 Aug 2011 19:03:44 +0000 (21:03 +0200)
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Aug 19 21:03:44 CEST 2011 on sn-devel-104

source3/passdb/py_passdb.c

index 9192ab3ce78449b3d9720e7bc69cb411b2d24a1b..e23f47578e8d0ce89f97d52f82bdb9f25a393351 100644 (file)
 #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