src/cpython.h: Apparently Python 2.3 doesn't have the Py_RETURN_NONE macro.
[collectd.git] / src / cpython.h
index 21ed006..33086b2 100644 (file)
 } while (0)
 #endif
 
+/* Python 2.4 has this macro, older versions do not. */
+#ifndef Py_RETURN_NONE
+# define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
+#endif
+
 typedef struct {
        PyObject_HEAD        /* No semicolon! */
        PyObject *parent;    /* Config */