summaryrefslogtreecommitdiffstats
path: root/Python/future.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-16 08:19:20 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-16 08:19:20 (GMT)
commit3b73ea127892d0e1f9d8f12f88e4f9c0ba0b89b1 (patch)
treea1a58a83f9d60f7d5d02e5d116bb76ee13c42254 /Python/future.c
parent21060105d99a9153db44dd88eb750965392fd966 (diff)
parentf4934ea77da38516731a75fbf9458b248d26dd81 (diff)
downloadcpython-3b73ea127892d0e1f9d8f12f88e4f9c0ba0b89b1.zip
cpython-3b73ea127892d0e1f9d8f12f88e4f9c0ba0b89b1.tar.gz
cpython-3b73ea127892d0e1f9d8f12f88e4f9c0ba0b89b1.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c
index 75f2107..d94b23d 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);