diff options
author | ?ukasz Langa <lukasz@langa.pl> | 2017-02-10 00:20:16 -0800 |
---|---|---|
committer | ?ukasz Langa <lukasz@langa.pl> | 2017-02-10 00:20:16 -0800 |
commit | 8972587fab93cd27ac78b4eab3805f5e11164cb9 (patch) | |
tree | 3b6b18367a3054c41f3a186d60c321ef9a08ee38 /Objects/stringlib/unicode_format.h | |
parent | c7a3f78cc193bfa7fc874f49ec2e0799b32da817 (diff) | |
parent | 2328d19475109a50de26fa42832a5286824b0391 (diff) | |
download | cpython-8972587fab93cd27ac78b4eab3805f5e11164cb9.tar.gz |
Merge 3.6 (fix #29519)
Diffstat (limited to 'Objects/stringlib/unicode_format.h')
-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 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); } |