Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever
possible but Coccinelle couldn't find opportunity.
diff --git a/Include/py_curses.h b/Include/py_curses.h
index 3c21697..336c95d 100644
--- a/Include/py_curses.h
+++ b/Include/py_curses.h
@@ -154,19 +154,16 @@
{ \
PyCursesInitialised \
if (X () == FALSE) { \
- Py_INCREF(Py_False); \
- return Py_False; \
+ Py_RETURN_FALSE; \
} \
- Py_INCREF(Py_True); \
- return Py_True; }
+ Py_RETURN_TRUE; }
#define NoArgNoReturnVoidFunction(X) \
static PyObject *PyCurses_ ## X (PyObject *self) \
{ \
PyCursesInitialised \
X(); \
- Py_INCREF(Py_None); \
- return Py_None; }
+ Py_RETURN_NONE; }
#ifdef __cplusplus
}