diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 13:40:39 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 13:40:39 (GMT) |
commit | f5894dd646f5e39918377b37b8c8694cebdca103 (patch) | |
tree | 7332d366d9a5888ac6c5b8b15f0c1d6ea7bf2481 /Python/pythonrun.c | |
parent | f4934ea77da38516731a75fbf9458b248d26dd81 (diff) | |
download | cpython-f5894dd646f5e39918377b37b8c8694cebdca103.zip cpython-f5894dd646f5e39918377b37b8c8694cebdca103.tar.gz cpython-f5894dd646f5e39918377b37b8c8694cebdca103.tar.bz2 |
Issue #28701: Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId.
The latter function is more readable, faster and doesn't raise exceptions.
Based on patch by Xiang Zhang.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 7fbf06e..72b6c9b 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -747,7 +747,7 @@ print_exception(PyObject *f, PyObject *value) err = PyFile_WriteString("<unknown>", f); } else { - if (_PyUnicode_CompareWithId(moduleName, &PyId_builtins) != 0) + if (!_PyUnicode_EqualToASCIIId(moduleName, &PyId_builtins)) { err = PyFile_WriteObject(moduleName, f, Py_PRINT_RAW); err += PyFile_WriteString(".", f); |