Skip to content

Commit

Permalink
Remove unnecessary check in _PyPegen_raise_errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lysnikolaou committed Oct 16, 2023
1 parent 99047c0 commit 18e4807
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions Parser/pegen_errors.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,6 @@ _PyPegen_raise_error(Parser *p, PyObject *errtype, int use_mark, const char *err
col_offset = 0;
} else {
const char* start = p->tok->buf ? p->tok->line_start : p->tok->buf;
if (p->tok->cur - start > INT_MAX) {
PyErr_SetString(PyExc_OverflowError,
"Parser column offset overflow - source line is too big");
p->error_indicator = 1;
return NULL;
}
col_offset = Py_SAFE_DOWNCAST(p->tok->cur - start, intptr_t, int);
}
} else {
Expand Down

0 comments on commit 18e4807

Please sign in to comment.