diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 15:41:31 +0200 |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 15:41:31 +0200 |
| commit | 29a54473600bc69975fd84b67570f5b04c447d84 (patch) | |
| tree | 4c98ac7ff2948dc9b933dfcd72ef25f0d0227214 /Python/errors.c | |
| parent | 1a73bf365e9664f8dd3357ebbb78ceaa79df2172 (diff) | |
| parent | fab6acd9f58584d2f4b361418e4d17f9c23db2f9 (diff) | |
| download | cpython-git-29a54473600bc69975fd84b67570f5b04c447d84.tar.gz | |
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/errors.c')
| -rw-r--r-- | Python/errors.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c index d459fae622..1463cdca3f 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -984,7 +984,7 @@ PyErr_WriteUnraisable(PyObject *obj) goto done; } else { - if (_PyUnicode_CompareWithId(moduleName, &PyId_builtins) != 0) { + if (!_PyUnicode_EqualToASCIIId(moduleName, &PyId_builtins)) { if (PyFile_WriteObject(moduleName, f, Py_PRINT_RAW) < 0) goto done; if (PyFile_WriteString(".", f) < 0) |
