Skip to content

Commit 962696b

Browse files
committed
gh-106320: _testcapi avoids private _PyUnicode_EqualToASCIIString()
Replace private _PyUnicode_EqualToASCIIString() with public PyUnicode_CompareWithASCIIString().
1 parent dbefa88 commit 962696b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_testcapi/unicode.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ test_string_from_format(PyObject *self, PyObject *Py_UNUSED(ignored))
11001100
} \
11011101
else if (result == NULL) \
11021102
return NULL; \
1103-
else if (!_PyUnicode_EqualToASCIIString(result, EXPECTED)) { \
1103+
else if (PyUnicode_CompareWithASCIIString(result, EXPECTED) == 0) { \
11041104
PyErr_Format(PyExc_AssertionError, \
11051105
"test_string_from_format: failed at \"%s\" " \
11061106
"expected \"%s\" got \"%s\"", \

0 commit comments

Comments
 (0)