Fix usage of PyUnicode_READY() in PyUnicode_GetLength()
This commit is contained in:
parent
cd9950fd09
commit
5a706cf8c0
|
@ -2838,7 +2838,7 @@ PyUnicode_GetSize(PyObject *unicode)
|
||||||
Py_ssize_t
|
Py_ssize_t
|
||||||
PyUnicode_GetLength(PyObject *unicode)
|
PyUnicode_GetLength(PyObject *unicode)
|
||||||
{
|
{
|
||||||
if (!PyUnicode_Check(unicode) || PyUnicode_READY(unicode) != -1) {
|
if (!PyUnicode_Check(unicode) || PyUnicode_READY(unicode) == -1) {
|
||||||
PyErr_BadArgument();
|
PyErr_BadArgument();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue