diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index f4dc9bf..1d35c3d 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -907,13 +907,9 @@ PyObject *PyUnicode_AsUTF8String(PyObject *unicode) PyErr_BadArgument(); return NULL; } - str = PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(unicode), - PyUnicode_GET_SIZE(unicode), - NULL); - if (str == NULL) - return NULL; - Py_INCREF(str); - return str; + return PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(unicode), + PyUnicode_GET_SIZE(unicode), + NULL); } /* --- UTF-16 Codec ------------------------------------------------------- */ |