mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
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:
parent
228b12edcc
commit
d1302c0154
5 changed files with 10 additions and 19 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue