From 34f741104e4212fb28d9fc06f60c0503e02fb556 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 4 Jan 2016 13:23:50 +1300 Subject: [PATCH 2/3] python: Remove Python 2.4 support macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We require Python 2.6 Signed-off-by: Andrew Bartlett Reviewed-by: Jelmer Vernooij (cherry picked from commit 0e58705a5bc11a9556d0774f9cb2fbb3897839c8) --- source3/passdb/py_passdb.c | 7 ------- source4/auth/pyauth.c | 7 ------- source4/dsdb/pydsdb.c | 7 ------- source4/param/pyparam.c | 6 ------ source4/web_server/wsgi.c | 7 ------- 5 files changed, 34 deletions(-) diff --git a/source3/passdb/py_passdb.c b/source3/passdb/py_passdb.c index ca43f70..0d4ca3b 100644 --- a/source3/passdb/py_passdb.c +++ b/source3/passdb/py_passdb.c @@ -27,13 +27,6 @@ #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 diff --git a/source4/auth/pyauth.c b/source4/auth/pyauth.c index d79d417..37f19fa 100644 --- a/source4/auth/pyauth.c +++ b/source4/auth/pyauth.c @@ -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); diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index 4d38c4a..ea30898 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -31,13 +31,6 @@ 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")) { \ diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index 14ffb2d..d1ba009 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -26,12 +26,6 @@ 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) diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c index f0e7bd5..0b1c5d2 100644 --- a/source4/web_server/wsgi.c +++ b/source4/web_server/wsgi.c @@ -28,13 +28,6 @@ #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; -- 1.9.1