Skip to content

Commit fb7e799

Browse files
vstinnerambv
authored andcommitted
bpo-30465: Fix C downcast warning on Windows in ast.c (#6593)
ast.c: fstring_fix_node_location() downcasts a pointer difference to a C int. Replace int with Py_ssize_t to fix the compiler warning.
1 parent 5a49ca6 commit fb7e799

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/ast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4313,7 +4313,7 @@ fstring_fix_node_location(const node *parent, node *n, char *expr_str)
43134313
break;
43144314
start--;
43154315
}
4316-
cols += substr - start;
4316+
cols += (int)(substr - start);
43174317
/* Fix lineno in mulitline strings. */
43184318
while ((substr = strchr(substr + 1, '\n')))
43194319
lines--;

0 commit comments

Comments
 (0)