Skip to content

Commit

Permalink
gh-106320: _testcapi avoids private _PyUnicode_EqualToASCIIString()
Browse files Browse the repository at this point in the history
Replace private _PyUnicode_EqualToASCIIString() with public
PyUnicode_CompareWithASCIIString().
  • Loading branch information
vstinner committed Jul 2, 2023
1 parent c38c666 commit e61857e
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit e61857e

Please sign in to comment.