python: Remove Python 2.4 support macros
authorAndrew Bartlett <abartlet@samba.org>
Mon, 4 Jan 2016 00:23:50 +0000 (13:23 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 7 Jan 2016 22:33:10 +0000 (23:33 +0100)
We require Python 2.6

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
source3/passdb/py_passdb.c
source4/auth/pyauth.c
source4/dsdb/pydsdb.c
source4/param/pyparam.c
source4/web_server/wsgi.c

index ca43f70cdb521ddb647a23908c077aee6bd5f698..0d4ca3bff156c70b8400be2e799cab24e1fcd58b 100644 (file)
 #include "secrets.h"
 #include "idmap.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_TYPE /* Py_TYPE is only available on Python > 2.6 */
 #define Py_TYPE(ob)             (((PyObject*)(ob))->ob_type)
 #endif
index d79d41782d9528457576b490ec90867b63c68731..37f19fa2421d59232b68f155a9ec7578a8642118 100644 (file)
@@ -36,13 +36,6 @@ void initauth(void);
 
 staticforward PyTypeObject PyAuthContext;
 
-/* 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
-
 static PyObject *PyAuthSession_FromSession(struct auth_session_info *session)
 {
        return py_return_ndr_struct("samba.dcerpc.auth", "session_info", session, session);
index 0a11e7b94bbb487016bd22fa525a491f2bf5d5b8..8f36e8acdc81da9ddbc1ebcf383e1a0898e39a12 100644 (file)
 
 void initdsdb(void);
 
-/* 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
-
 /* FIXME: These should be in a header file somewhere */
 #define PyErr_LDB_OR_RAISE(py_ldb, ldb) \
        if (!py_check_dcerpc_type(py_ldb, "ldb", "Ldb")) { \
index 14ffb2d8c38263ed9eecf2da275e4cb9902dafd6..d1ba009d9bab980d5a0a5eed5a6a80ffa83a7b36 100644 (file)
 
 void initparam(void);
 
-/* 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;
-#endif
-
 #define PyLoadparmContext_AsLoadparmContext(obj) pytalloc_get_type(obj, struct loadparm_context)
 #define PyLoadparmService_AsLoadparmService(obj) pytalloc_get_type(obj, struct loadparm_service)
 
index f0e7bd59b854d26f60c008f60466942190d8cad4..0b1c5d29014afc1a422d1debd297bdf3d60c2b94 100644 (file)
 #include "lib/tsocket/tsocket.h"
 #include "python/modules.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
-
 typedef struct {
        PyObject_HEAD
        struct websrv_context *web;