Skip to content
Closed
Show file tree
Hide file tree
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-106025: Fix incorrect usage of PyUnicode_CompareWithASCIIString in…
… suggestions.c
  • Loading branch information
pablogsal committed Jun 23, 2023
commit 39f72456c98a79f5afb6783ade7ca31a8ed230d6
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix incorrect usage of :c:func:`PyUnicode_CompareWithASCIIString` in
``suggestions.c``. Patch by Pablo Galindo
2 changes: 1 addition & 1 deletion Python/suggestions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down