mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever
possible. Patch is writen with Coccinelle.
This commit is contained in:
parent
60e6e962ba
commit
228b12edcc
57 changed files with 225 additions and 445 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue