s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4
[metze/samba/wip.git] / lib / tevent / pytevent.c
index 3d71d78397414394b92bb9e675aa54c2445c1fb5..756d013ede83b771aee82e6c5d2535ca1c2f0e0d 100644 (file)
@@ -16,7 +16,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <Python.h>
+#include "../lib/util/python_util.h"
 #include <tevent.h>
 #include <stdbool.h>
 #include <tevent_util.h>
@@ -35,7 +35,7 @@ static PyObject *py_set_default_backend(PyObject *self, PyObject *args)
     if (!PyArg_ParseTuple(args, "s", &name))
         return NULL;
     tevent_set_default_backend(name);
-    return Py_None;
+    Py_RETURN_NONE;
 }
 
 static PyObject *py_backend_list(PyObject *self)