summaryrefslogtreecommitdiffstats
path: root/Include/py_curses.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-01-23 08:23:58 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2017-01-23 08:23:58 (GMT)
commitd1302c01544317267345970f351a015626b54f61 (patch)
tree332559e78670c92434301ee77133ec08fd762973 /Include/py_curses.h
parent228b12edcce49649d6befa3c03dbcefd5a22ae76 (diff)
downloadcpython-d1302c01544317267345970f351a015626b54f61.zip
cpython-d1302c01544317267345970f351a015626b54f61.tar.gz
cpython-d1302c01544317267345970f351a015626b54f61.tar.bz2
Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever
possible but Coccinelle couldn't find opportunity.
Diffstat (limited to 'Include/py_curses.h')
-rw-r--r--Include/py_curses.h9
1 files changed, 3 insertions, 6 deletions
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 @@ static PyObject *PyCurses_ ## X (PyObject *self) \
{ \
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
}