diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 10:19:20 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-11-16 10:19:20 +0200 |
commit | 3b73ea127892d0e1f9d8f12f88e4f9c0ba0b89b1 (patch) | |
tree | a1a58a83f9d60f7d5d02e5d116bb76ee13c42254 /Modules/_pickle.c | |
parent | 21060105d99a9153db44dd88eb750965392fd966 (diff) | |
parent | f4934ea77da38516731a75fbf9458b248d26dd81 (diff) | |
download | cpython-git-3b73ea127892d0e1f9d8f12f88e4f9c0ba0b89b1.tar.gz |
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 fc16c63f75..54b1856f8b 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -1687,7 +1687,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; |