Skip to content

Commit

Permalink
rm variable & add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dg-pb committed Jun 6, 2024
1 parent c8e1cc5 commit b5bd4c5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Objects/stringlib/fastsearch.h
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,6 @@ STRINGLIB(_two_way)(const STRINGLIB_CHAR *s, Py_ssize_t n,
const Py_ssize_t p_stt = dir == 1 ? 0 : m - 1;
const Py_ssize_t s_stt = dir == 1 ? 0 : n - 1;
const Py_ssize_t p_end = dir == 1 ? m - 1 : 0;
const Py_ssize_t cut_idx = reversed ? m - cut : cut;
const Py_ssize_t dir_m_m1 = reversed ? -m_m1 : m_m1;
const STRINGLIB_CHAR *const ss = s + s_stt + dir_m_m1;

Expand Down Expand Up @@ -532,7 +531,7 @@ STRINGLIB(_two_way)(const STRINGLIB_CHAR *s, Py_ssize_t n,
if (j != m) {
continue;
}
j = Py_MIN(memory, cut);
j = Py_MIN(memory, cut); // Needed for j == cut below to be correct
for (; j < cut; j++) {
ihits++;
jp = p_stt + (reversed ? -j : j);
Expand Down

0 comments on commit b5bd4c5

Please sign in to comment.