Unverified Kaydet (Commit) 7cc95f50 authored tarafından INADA Naoki's avatar INADA Naoki Kaydeden (comit) GitHub

Fix wrong assert in unicodeobject (GH-5340)

üst 4defba3b
...@@ -11038,7 +11038,7 @@ _PyUnicode_EqualToASCIIId(PyObject *left, _Py_Identifier *right) ...@@ -11038,7 +11038,7 @@ _PyUnicode_EqualToASCIIId(PyObject *left, _Py_Identifier *right)
if (PyUnicode_CHECK_INTERNED(left)) if (PyUnicode_CHECK_INTERNED(left))
return 0; return 0;
assert(_PyUnicode_HASH(right_uni) != 1); assert(_PyUnicode_HASH(right_uni) != -1);
hash = _PyUnicode_HASH(left); hash = _PyUnicode_HASH(left);
if (hash != -1 && hash != _PyUnicode_HASH(right_uni)) if (hash != -1 && hash != _PyUnicode_HASH(right_uni))
return 0; return 0;
......
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