summaryrefslogtreecommitdiff
path: root/Objects/stringlib/unicode_format.h
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2017-02-06 07:15:57 -0800
committerRaymond Hettinger <python@rcn.com>2017-02-06 07:15:57 -0800
commit826745ba953b4ef23462fb0bc2d7b3db23b51d89 (patch)
tree7789cc87df07c2786c40e6888cbb532a94ce6334 /Objects/stringlib/unicode_format.h
parent95b272b4e0d5438a12702e51e05d03f5a5a8e505 (diff)
parent515f1cf20f4e9656b1bcda236bad8ed0e33770f0 (diff)
downloadcpython-826745ba953b4ef23462fb0bc2d7b3db23b51d89.tar.gz
merge
Diffstat (limited to 'Objects/stringlib/unicode_format.h')
-rw-r--r--Objects/stringlib/unicode_format.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/Objects/stringlib/unicode_format.h b/Objects/stringlib/unicode_format.h
index 14fa28ea54..7ac0d75166 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);
}