mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
This commit is contained in:
parent
5ebff7b300
commit
f4934ea77d
21 changed files with 120 additions and 75 deletions
|
@ -2310,7 +2310,7 @@ test_string_from_format(PyObject *self, PyObject *args)
|
|||
result = PyUnicode_FromFormat(FORMAT, (TYPE)1); \
|
||||
if (result == NULL) \
|
||||
return NULL; \
|
||||
if (PyUnicode_CompareWithASCIIString(result, "1")) { \
|
||||
if (!_PyUnicode_EqualToASCIIString(result, "1")) { \
|
||||
msg = FORMAT " failed at 1"; \
|
||||
goto Fail; \
|
||||
} \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue