commit | 5a706cf8c0284b80b7aad6b72858027c844091a5 | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@haypocalc.com> | Sun Oct 02 00:36:53 2011 +0200 |
committer | Victor Stinner <victor.stinner@haypocalc.com> | Sun Oct 02 00:36:53 2011 +0200 |
tree | e9ad5e6d013922552cf81ae31429af87d9bf8b00 | |
parent | cd9950fd094394927c0cf85560679ca6a7b33038 [diff] [blame] |
Fix usage of PyUnicode_READY() in PyUnicode_GetLength()
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 3ce845c..7215517 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c
@@ -2838,7 +2838,7 @@ Py_ssize_t PyUnicode_GetLength(PyObject *unicode) { - if (!PyUnicode_Check(unicode) || PyUnicode_READY(unicode) != -1) { + if (!PyUnicode_Check(unicode) || PyUnicode_READY(unicode) == -1) { PyErr_BadArgument(); return -1; }