summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapi
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-07-02 21:56:58 (GMT)
committerGitHub <noreply@github.com>2023-07-02 21:56:58 (GMT)
commit4e3aa7cd312759922556ee96aa42033c375027e2 (patch)
tree7f44c0471cc2fdb5dd44897f01e438f6987481b5 /Modules/_testcapi
parentc38c66687f148991031914f12ebd5c42d6e26b5b (diff)
downloadcpython-4e3aa7cd312759922556ee96aa42033c375027e2.zip
cpython-4e3aa7cd312759922556ee96aa42033c375027e2.tar.gz
cpython-4e3aa7cd312759922556ee96aa42033c375027e2.tar.bz2
gh-106320: _testcapi avoids private _PyUnicode_EqualToASCIIString() (#106341)
Replace private _PyUnicode_EqualToASCIIString() with public PyUnicode_CompareWithASCIIString().
Diffstat (limited to 'Modules/_testcapi')
-rw-r--r--Modules/_testcapi/unicode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_testcapi/unicode.c b/Modules/_testcapi/unicode.c
index 367d2af..9c2760c 100644
--- a/Modules/_testcapi/unicode.c
+++ b/Modules/_testcapi/unicode.c
@@ -1100,7 +1100,7 @@ test_string_from_format(PyObject *self, PyObject *Py_UNUSED(ignored))
} \
else if (result == NULL) \
return NULL; \
- else if (!_PyUnicode_EqualToASCIIString(result, EXPECTED)) { \
+ else if (PyUnicode_CompareWithASCIIString(result, EXPECTED) != 0) { \
PyErr_Format(PyExc_AssertionError, \
"test_string_from_format: failed at \"%s\" " \
"expected \"%s\" got \"%s\"", \