From bfeec6d871e3db2e0ddfdef01387913bc19cadd4 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 23 Jan 2017 09:47:21 +0200 Subject: Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever possible. Patch is writen with Coccinelle. --- Modules/parsermodule.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Modules/parsermodule.c') diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index b2566951d0..e5c4db3048 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -91,8 +91,7 @@ node2tuple(node *n, /* node to convert */ PyObject *result = NULL, *w; if (n == NULL) { - Py_INCREF(Py_None); - return Py_None; + Py_RETURN_NONE; } if (ISNONTERMINAL(TYPE(n))) { -- cgit v1.2.1