8000 bpo-40958: Avoid 'possible loss of data' warning on Windows (GH-20970) · python/cpython@861efc6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 861efc6

Browse files
authored
bpo-40958: Avoid 'possible loss of data' warning on Windows (GH-20970)
1 parent 344c2a7 commit 861efc6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Parser/pegen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ _PyPegen_raise_error_known_location(Parser *p, PyObject *errtype,
397397
}
398398

39 A699 9399
if (p->start_rule == Py_file_input) {
400-
error_line = PyErr_ProgramTextObject(p->tok->filename, lineno);
400+
error_line = PyErr_ProgramTextObject(p->tok->filename, (int) lineno);
401401
}
402402

403403
if (!error_line) {

Parser/pegen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ typedef struct _memo {
3434
typedef struct {
3535
int type;
3636
PyObject *bytes;
37-
Py_ssize_t lineno, col_offset, end_lineno, end_col_offset;
37+
int lineno, col_offset, end_lineno, end_col_offset;
3838
Memo *memo;
3939
} Token;
4040

0 commit comments

Comments
 (0)
0