mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Fix usage of PyUnicode_READY() in PyUnicode_GetLength()
This commit is contained in:
parent
cd9950fd09
commit
5a706cf8c0
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue