diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-23 10:23:58 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-23 10:23:58 +0200 |
commit | 1bd620bca594ba9193c63e79e7836765d23047cc (patch) | |
tree | decee76f583199d033187e74c44277f7f79e4895 /Include/py_curses.h | |
parent | bfeec6d871e3db2e0ddfdef01387913bc19cadd4 (diff) | |
download | cpython-1bd620bca594ba9193c63e79e7836765d23047cc.tar.gz |
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.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Include/py_curses.h b/Include/py_curses.h index 3c21697073..336c95d360 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 } |