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 /Python/future.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 'Python/future.c')
-rw-r--r-- | Python/future.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c index 163f87f..4de801b 100644 --- a/Python/future.c +++ b/Python/future.c @@ -99,7 +99,7 @@ future_parse(PyFutureFeatures *ff, mod_ty mod, PyObject *filename) if (s->kind == ImportFrom_kind) { identifier modname = s->v.ImportFrom.module; if (modname && - !PyUnicode_CompareWithASCIIString(modname, "__future__")) { + _PyUnicode_EqualToASCIIString(modname, "__future__")) { if (done) { PyErr_SetString(PyExc_SyntaxError, ERR_LATE_FUTURE); |