Avoid using a utility header for Python replacements included in Samba,
[kai/samba-autobuild/.git] / source4 / param / pyparam.c
index f6a0b4f6749ba30c1f826d6c26cb8d9793340ebf..2d5a584fb2709656573de95464e83b022ecd959d 100644 (file)
@@ -23,6 +23,7 @@
 #include "includes.h"
 #include "param/param.h"
 #include "param/loadparm.h"
+#include <Python.h>
 #include "pytalloc.h"
 
 /* There's no Py_ssize_t in 2.4, apparently */
@@ -31,6 +32,10 @@ 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_ptr(obj)
 
 PyAPI_DATA(PyTypeObject) PyLoadparmContext;