summaryrefslogtreecommitdiff
path: root/Python/future.c
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
commit78779b765c2d7f89fab3868b77b6a6522c55ee4c (patch)
tree8df49348f2e40aeb09ab893822424a995f4764c9 /Python/future.c
parentf3ba65bd7b8aee8b0351c6bf2f8fd000b165e7f5 (diff)
downloadcpython-78779b765c2d7f89fab3868b77b6a6522c55ee4c.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/future.c b/Python/future.c
index 163f87f673..4de801bfc0 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);