aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-16 10:17:58 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-16 10:17:58 +0200
commitf4934ea77da38516731a75fbf9458b248d26dd81 (patch)
tree9fe19276fac7661f433f86673ff7862663ed7693 /Python/future.c
parentMerge - upgrade pip/setuptools (diff)
downloadcpython-f4934ea77da38516731a75fbf9458b248d26dd81.tar.gz
cpython-f4934ea77da38516731a75fbf9458b248d26dd81.tar.bz2
cpython-f4934ea77da38516731a75fbf9458b248d26dd81.zip
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c
index 163f87f673d..4de801bfc0a 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);