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 | c0797803c0d4303489709f02078c8c6adc4eed36 (patch) | |
tree | d3b5afe679e3030eecf9372a6c6bdee5bc5f39e0 /Python/future.c | |
parent | cf0a090abb7d7c2a3baf33a5183c0842dd316608 (diff) | |
parent | 78779b765c2d7f89fab3868b77b6a6522c55ee4c (diff) | |
download | cpython-c0797803c0d4303489709f02078c8c6adc4eed36.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 '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 75f210769e..d94b23d4d2 100644 --- a/Python/future.c +++ b/Python/future.c @@ -102,7 +102,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); |