diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-23 08:23:58 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-23 08:23:58 (GMT) |
commit | d1302c01544317267345970f351a015626b54f61 (patch) | |
tree | 332559e78670c92434301ee77133ec08fd762973 /Objects | |
parent | 228b12edcce49649d6befa3c03dbcefd5a22ae76 (diff) | |
download | cpython-d1302c01544317267345970f351a015626b54f61.zip cpython-d1302c01544317267345970f351a015626b54f61.tar.gz cpython-d1302c01544317267345970f351a015626b54f61.tar.bz2 |
Issue #28999: Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever
possible but Coccinelle couldn't find opportunity.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/stringlib/unicode_format.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/stringlib/unicode_format.h b/Objects/stringlib/unicode_format.h index 14fa28e..7ac0d75 100644 --- a/Objects/stringlib/unicode_format.h +++ b/Objects/stringlib/unicode_format.h @@ -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); } |