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

Skip to content

Commit c9f83c1

Browse files
bpo-40958: Avoid 'possible loss of data' warning on Windows (GH-20970)
(cherry picked from commit 861efc6) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
1 parent 7523886 commit c9f83c1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Parser/pegen/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

399399
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/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