Skip to content

Commit 4e3aa7c

Browse files
authored
gh-106320: _testcapi avoids private _PyUnicode_EqualToASCIIString() (#106341)
Replace private _PyUnicode_EqualToASCIIString() with public PyUnicode_CompareWithASCIIString().
1 parent c38c666 commit 4e3aa7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_testcapi/unicode.c

Lines changed: 1 addition & 1 deletion
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)