commit | e1335c711c555567a9951dd5c1dfde85545445d4 | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@haypocalc.com> | Tue Oct 04 20:53:03 2011 +0200 |
committer | Victor Stinner <victor.stinner@haypocalc.com> | Tue Oct 04 20:53:03 2011 +0200 |
tree | ce073dc242b4399ed8bcc67062d7896fb717908d | |
parent | e06e145943854d398adfe053cec757e269af0631 [diff] [blame] |
Fix usage og PyUnicode_READY()
diff --git a/Modules/_io/stringio.c b/Modules/_io/stringio.c index c40163f..a4536b1 100644 --- a/Modules/_io/stringio.c +++ b/Modules/_io/stringio.c
@@ -131,6 +131,10 @@ return -1; assert(PyUnicode_Check(decoded)); + if (PyUnicode_READY(decoded)) { + Py_DECREF(decoded); + return -1; + } len = PyUnicode_GET_LENGTH(decoded); assert(len >= 0);