From 1bd620bca594ba9193c63e79e7836765d23047cc Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 23 Jan 2017 10:23:58 +0200 Subject: Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever possible but Coccinelle couldn't find opportunity. --- Include/py_curses.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'Include/py_curses.h') 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 } -- cgit v1.2.1