Skip to content

Commit

Permalink
pythongh-106320: _testcapi: avoid private _PyUnicode_EqualToASCIIStri…
Browse files Browse the repository at this point in the history
…ng()

Replace private _PyUnicode_EqualToASCIIString() with public
PyUnicode_CompareWithASCIIString().
  • Loading branch information
vstinner committed Jul 2, 2023
1 parent dbefa88 commit 3ea652f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/_testcapi/unicode.c
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 3ea652f

Please sign in to comment.