Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever

possible but Coccinelle couldn't find opportunity.
This commit is contained in:
Serhiy Storchaka 2017-01-23 10:23:58 +02:00
parent 228b12edcc
commit d1302c0154
5 changed files with 10 additions and 19 deletions

View file

@ -60,10 +60,8 @@ SubString_init(SubString *str, PyObject *s, Py_ssize_t start, Py_ssize_t end)
Py_LOCAL_INLINE(PyObject *)
SubString_new_object(SubString *str)
{
if (str->str == NULL) {
Py_INCREF(Py_None);
return Py_None;
}
if (str->str == NULL)
Py_RETURN_NONE;
return PyUnicode_Substring(str->str, str->start, str->end);
}