summaryrefslogtreecommitdiff
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-01-23 09:47:21 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2017-01-23 09:47:21 +0200
commit228b12edcce49649d6befa3c03dbcefd5a22ae76 (patch)
tree1066be6909fb981fcf30e1a8e224d43567bd9b92 /Objects/unicodeobject.c
parent60e6e962bac6a668d0df539ebf526a0a1c69eacd (diff)
downloadcpython-git-228b12edcce49649d6befa3c03dbcefd5a22ae76.tar.gz
Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever
possible. Patch is writen with Coccinelle.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index b711f0ccce..0b79c5bd1a 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -8254,9 +8254,7 @@ charmapencode_lookup(Py_UCS4 c, PyObject *mapping)
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;
}