bpo-30465: Fix C downcast warning on Windows in ast.c (#6593) · python/cpython@fb7e799 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit fb7e799
authored and
committed
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.
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -4313,7 +4313,7 @@ fstring_fix_node_location(const node *parent, node *n, char *expr_str) | ||
4313 | 4313 | break; |
4314 | 4314 | start--; |
4315 | 4315 | } |
4316 | -cols += substr - start; | |
4316 | +cols += (int)(substr - start); | |
4317 | 4317 | /* Fix lineno in mulitline strings. */ |
4318 | 4318 | while ((substr = strchr(substr + 1, '\n'))) |
4319 | 4319 | lines--; |