Skip to content

Commit

Permalink
bpo-30465: Fix C downcast warning on Windows in ast.c (#6593)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vstinner authored and ambv committed Apr 30, 2018
1 parent 5a49ca6 commit fb7e799
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -4313,7 +4313,7 @@ fstring_fix_node_location(const node *parent, node *n, char *expr_str)
break;
start--;
}
cols += substr - start;
cols += (int)(substr - start);
/* Fix lineno in mulitline strings. */
while ((substr = strchr(substr + 1, '\n')))
lines--;
Expand Down

0 comments on commit fb7e799

Please sign in to comment.