mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
PyObject_Str() ensures that the result string is ready
and check the string consistency. _PyUnicode_CheckConsistency() doesn't check the hash anymore. It should be possible to call this function even if hash(str) was already called.
This commit is contained in:
parent
2b979bfa3c
commit
4ead7c7be8
2 changed files with 5 additions and 2 deletions
|
@ -408,8 +408,6 @@ _PyUnicode_CheckConsistency(PyObject *op, int check_content)
|
|||
assert(maxchar <= 0x10FFFF);
|
||||
}
|
||||
}
|
||||
if (check_content && !unicode_is_singleton(op))
|
||||
assert(ascii->hash == -1);
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue