diff --git a/Misc/NEWS.d/next/Core and Builtins/2023-06-23-15-03-41.gh-issue-106025.Ij5Bnn.rst b/Misc/NEWS.d/next/Core and Builtins/2023-06-23-15-03-41.gh-issue-106025.Ij5Bnn.rst new file mode 100644 index 00000000000000..caa0453db6948a --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2023-06-23-15-03-41.gh-issue-106025.Ij5Bnn.rst @@ -0,0 +1,2 @@ +Fix incorrect usage of :c:func:`PyUnicode_CompareWithASCIIString` in +``suggestions.c``. Patch by Pablo Galindo diff --git a/Python/suggestions.c b/Python/suggestions.c index f2c018ef2c4533..e67ccfa3621455 100644 --- a/Python/suggestions.c +++ b/Python/suggestions.c @@ -157,7 +157,7 @@ calculate_suggestions(PyObject *dir, PyMem_Free(buffer); return NULL; } - if (PyUnicode_CompareWithASCIIString(name, item_str) == 0) { + if (PyUnicode_Compare(name, item) == 0) { continue; } // No more than 1/3 of the involved characters should need changed.