8000 gh-106320: _testcapi avoids private _PyUnicode_EqualToASCIIString() by vstinner · Pull Request #106341 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-106320: _testcapi avoids private _PyUnicode_EqualToASCIIString() #106341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2023
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
0