Fix usage of PyUnicode_READY() in PyUnicode_GetLength()

This commit is contained in:
Victor Stinner 2011-10-02 00:36:53 +02:00
parent cd9950fd09
commit 5a706cf8c0
1 changed files with 1 additions and 1 deletions

View File

@ -2838,7 +2838,7 @@ PyUnicode_GetSize(PyObject *unicode)
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;
}