commit | 228b12edcce49649d6befa3c03dbcefd5a22ae76 | [log] [tgz] |
---|---|---|
author | Serhiy Storchaka <storchaka@gmail.com> | Mon Jan 23 09:47:21 2017 +0200 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Mon Jan 23 09:47:21 2017 +0200 |
tree | 1066be6909fb981fcf30e1a8e224d43567bd9b92 | |
parent | 60e6e962bac6a668d0df539ebf526a0a1c69eacd [diff] [blame] |
Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever possible. Patch is writen with Coccinelle.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index b711f0c..0b79c5b 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c
@@ -8254,9 +8254,7 @@ if (PyErr_ExceptionMatches(PyExc_LookupError)) { /* No mapping found means: mapping is undefined. */ PyErr_Clear(); - x = Py_None; - Py_INCREF(x); - return x; + Py_RETURN_NONE; } else return NULL; }