diff --git a/source4/auth/credentials/pycredentials.c b/source4/auth/credentials/pycredentials.c index 59a200b09e1..3c06ae93028 100644 --- a/source4/auth/credentials/pycredentials.c +++ b/source4/auth/credentials/pycredentials.c @@ -25,10 +25,6 @@ #include "libcli/util/pyerrors.h" #include "param/pyparam.h" -#ifndef Py_RETURN_NONE -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None -#endif - static PyObject *PyString_FromStringOrNULL(const char *str) { if (str == NULL) diff --git a/source4/auth/gensec/pygensec.c b/source4/auth/gensec/pygensec.c index 87c38053a74..1c2bd20dde9 100644 --- a/source4/auth/gensec/pygensec.c +++ b/source4/auth/gensec/pygensec.c @@ -25,10 +25,6 @@ #include "pytalloc.h" #include -#ifndef Py_RETURN_NONE -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None -#endif - static PyObject *py_get_name_by_authtype(PyObject *self, PyObject *args) { int type; diff --git a/source4/lib/com/pycom.c b/source4/lib/com/pycom.c index 86e794e1732..3323ca645e6 100644 --- a/source4/lib/com/pycom.c +++ b/source4/lib/com/pycom.c @@ -23,10 +23,6 @@ #include "librpc/ndr/libndr.h" #include "libcli/util/pyerrors.h" -#ifndef Py_RETURN_NONE -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None -#endif - static struct com_context *py_com_ctx = NULL; /* FIXME: evil global */ static PyObject *py_get_class_object(PyObject *self, PyObject *args) diff --git a/source4/lib/messaging/pymessaging.c b/source4/lib/messaging/pymessaging.c index 0e6fe88b112..1f3b687e6fa 100644 --- a/source4/lib/messaging/pymessaging.c +++ b/source4/lib/messaging/pymessaging.c @@ -31,10 +31,6 @@ #include "param/param.h" #include "param/pyparam.h" -#ifndef Py_RETURN_NONE -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None -#endif - PyAPI_DATA(PyTypeObject) messaging_Type; PyAPI_DATA(PyTypeObject) irpc_ClientConnectionType; diff --git a/source4/lib/registry/pyregistry.c b/source4/lib/registry/pyregistry.c index e98ac266117..a2042f4d684 100644 --- a/source4/lib/registry/pyregistry.c +++ b/source4/lib/registry/pyregistry.c @@ -27,10 +27,6 @@ #include "auth/credentials/pycredentials.h" #include "param/pyparam.h" -#ifndef Py_RETURN_NONE -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None -#endif - PyAPI_DATA(PyTypeObject) PyRegistryKey; PyAPI_DATA(PyTypeObject) PyRegistry; PyAPI_DATA(PyTypeObject) PyHiveKey; diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c index a24649daca4..00bc6835f41 100644 --- a/source4/librpc/rpc/pyrpc.c +++ b/source4/librpc/rpc/pyrpc.c @@ -26,10 +26,6 @@ #include "param/pyparam.h" #include "auth/credentials/pycredentials.h" -#ifndef Py_RETURN_NONE -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None -#endif - static PyObject *py_dcerpc_run_function(dcerpc_InterfaceObject *iface, const struct PyNdrRpcMethodDef *md, PyObject *args, PyObject *kwargs) diff --git a/source4/ntvfs/posix/python/pyxattr_native.c b/source4/ntvfs/posix/python/pyxattr_native.c index 9b60039a385..7dcb5dd37a1 100644 --- a/source4/ntvfs/posix/python/pyxattr_native.c +++ b/source4/ntvfs/posix/python/pyxattr_native.c @@ -23,10 +23,6 @@ #include "librpc/ndr/libndr.h" #include "lib/util/wrap_xattr.h" -#ifndef Py_RETURN_NONE -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None -#endif - static PyObject *py_is_xattr_supported(PyObject *self) { #if !defined(HAVE_XATTR_SUPPORT) diff --git a/source4/ntvfs/posix/python/pyxattr_tdb.c b/source4/ntvfs/posix/python/pyxattr_tdb.c index e49cd887d06..195c8db967e 100644 --- a/source4/ntvfs/posix/python/pyxattr_tdb.c +++ b/source4/ntvfs/posix/python/pyxattr_tdb.c @@ -27,10 +27,6 @@ #include "ntvfs/posix/vfs_posix.h" #include "libcli/util/pyerrors.h" -#ifndef Py_RETURN_NONE -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None -#endif - static PyObject *py_is_xattr_supported(PyObject *self) { return Py_True; diff --git a/source4/param/pyparam.c b/source4/param/pyparam.c index b4255002d27..4b534fbb417 100644 --- a/source4/param/pyparam.c +++ b/source4/param/pyparam.c @@ -29,10 +29,6 @@ typedef int Py_ssize_t; typedef inquiry lenfunc; #endif -#ifndef Py_RETURN_NONE -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None -#endif - #define PyLoadparmContext_AsLoadparmContext(obj) py_talloc_get_type(obj, struct loadparm_context) PyAPI_DATA(PyTypeObject) PyLoadparmContext; diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c index 6ef70331285..5279a0b295b 100644 --- a/source4/scripting/python/pyglue.c +++ b/source4/scripting/python/pyglue.c @@ -35,10 +35,6 @@ #include "param/pyparam.h" #include "auth/credentials/pycredentials.h" -#ifndef Py_RETURN_NONE -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None -#endif - /* FIXME: These should be in a header file somewhere, once we finish moving * away from SWIG .. */ #define PyErr_LDB_OR_RAISE(py_ldb, ldb) \ diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c index 48255bc205e..9b5e38400c6 100644 --- a/source4/web_server/wsgi.c +++ b/source4/web_server/wsgi.c @@ -27,10 +27,6 @@ #include "../lib/util/data_blob.h" #include "lib/tls/tls.h" -#ifndef Py_RETURN_NONE -#define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None -#endif - typedef struct { PyObject_HEAD struct websrv_context *web;