[Python-checkins] Fix wrong assert in unicodeobject (GH-5340)
INADA Naoki
webhook-mailer at python.org
Sat Jan 27 12:07:12 EST 2018
https://github.com/python/cpython/commit/7cc95f5069c8983afb8a55928db6956abe2d5afa
commit: 7cc95f5069c8983afb8a55928db6956abe2d5afa
branch: master
author: INADA Naoki <methane at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-01-28T02:07:09+09:00
summary:
Fix wrong assert in unicodeobject (GH-5340)
files:
M Objects/unicodeobject.c
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 4b90cc364b8..775bd15cf6d 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -11038,7 +11038,7 @@ _PyUnicode_EqualToASCIIId(PyObject *left, _Py_Identifier *right)
if (PyUnicode_CHECK_INTERNED(left))
return 0;
- assert(_PyUnicode_HASH(right_uni) != 1);
+ assert(_PyUnicode_HASH(right_uni) != -1);
hash = _PyUnicode_HASH(left);
if (hash != -1 && hash != _PyUnicode_HASH(right_uni))
return 0;
More information about the Python-checkins
mailing list