summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-16 08:19:57 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-16 08:19:57 (GMT)
commit1a73bf365e9664f8dd3357ebbb78ceaa79df2172 (patch)
tree87917a1a572c2f3c5a574d6a96a9879970a941d9 /Modules/_testcapimodule.c
parent1e2784e0b3cb8d9050bffb338b2de838fbba13a2 (diff)
parent3b73ea127892d0e1f9d8f12f88e4f9c0ba0b89b1 (diff)
downloadcpython-1a73bf365e9664f8dd3357ebbb78ceaa79df2172.zip
cpython-1a73bf365e9664f8dd3357ebbb78ceaa79df2172.tar.gz
cpython-1a73bf365e9664f8dd3357ebbb78ceaa79df2172.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 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index b343080..c53e079 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2325,7 +2325,7 @@ test_string_from_format(PyObject *self, PyObject *args)
result = PyUnicode_FromFormat(FORMAT, (TYPE)1); \
if (result == NULL) \
return NULL; \
- if (PyUnicode_CompareWithASCIIString(result, "1")) { \
+ if (!_PyUnicode_EqualToASCIIString(result, "1")) { \
msg = FORMAT " failed at 1"; \
goto Fail; \
} \