Commit 5a706cf8 authored by Victor Stinner's avatar Victor Stinner

Fix usage of PyUnicode_READY() in PyUnicode_GetLength()

parent cd9950fd
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment