Skip to content

Commit

Permalink
gh-126209: Fix the inconsistent results of c and python implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
zsaladin committed Nov 2, 2024
1 parent 260843d commit aae957a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Python/_warnings.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,8 @@ is_filename_to_skip(PyObject *filename, PyTupleObject *skip_file_prefixes)
for (Py_ssize_t idx = 0; idx < prefixes; ++idx)
{
PyObject *prefix = PyTuple_GET_ITEM(skip_file_prefixes, idx);
Py_ssize_t found = PyUnicode_Tailmatch(filename, prefix, 0, -1, -1);
Py_ssize_t found = PyUnicode_Tailmatch(filename, prefix,
0, PY_SSIZE_T_MAX, -1);
if (found == 1) {
return true;
}
Expand Down

0 comments on commit aae957a

Please sign in to comment.