diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 08:17:58 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 08:17:58 (GMT) |
commit | f4934ea77da38516731a75fbf9458b248d26dd81 (patch) | |
tree | 9fe19276fac7661f433f86673ff7862663ed7693 /Modules/_pickle.c | |
parent | 5ebff7b300448db36d0d0eda7d265caa06fce6d2 (diff) | |
download | cpython-f4934ea77da38516731a75fbf9458b248d26dd81.zip cpython-f4934ea77da38516731a75fbf9458b248d26dd81.tar.gz cpython-f4934ea77da38516731a75fbf9458b248d26dd81.tar.bz2 |
Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
Diffstat (limited to 'Modules/_pickle.c')
-rw-r--r-- | Modules/_pickle.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 3c21b6a..ac7f5c4 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -1675,7 +1675,7 @@ whichmodule(PyObject *global, PyObject *dotted_path) while (PyDict_Next(modules_dict, &i, &module_name, &module)) { PyObject *candidate; if (PyUnicode_Check(module_name) && - !PyUnicode_CompareWithASCIIString(module_name, "__main__")) + _PyUnicode_EqualToASCIIString(module_name, "__main__")) continue; if (module == Py_None) continue; |