Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-106320: _testcapi avoids private _PyUnicode_EqualToASCIIString()
Replace private _PyUnicode_EqualToASCIIString() with public
PyUnicode_CompareWithASCIIString().
  • Loading branch information
vstinner committed Jul 2, 2023
commit e61857eb1d92bc777fad819f027e8fc0a4034703
2 changes: 1 addition & 1 deletion Modules/_testcapi/unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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\"", \
Expand Down