From 4e3aa7cd312759922556ee96aa42033c375027e2 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 2 Jul 2023 23:56:58 +0200 Subject: gh-106320: _testcapi avoids private _PyUnicode_EqualToASCIIString() (#106341) Replace private _PyUnicode_EqualToASCIIString() with public PyUnicode_CompareWithASCIIString(). --- Modules/_testcapi/unicode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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\"", \ -- cgit v0.12