This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python\ast.c(3875): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int'
Type: compile error Stage: resolved
Components: Windows Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: pablogsal, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Priority: normal Keywords: easy (C), patch

Created on 2019-02-19 16:41 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 11949 merged pablogsal, 2019-02-19 22:53
Messages (3)
msg335974 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-02-19 16:41
Example on AMD64 Windows8.1 Non-Debug 3.x buildbot:
https://buildbot.python.org/all/#/builders/12/builds/2024

2>d:\buildarea\3.x.ware-win81-release\build\python\ast.c(3875): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data [D:\buildarea\3.x.ware-win81-release\build\PCbuild\pythoncore.vcxproj]
msg335981 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-02-19 17:08
Eh, just needs to change the local variable to Py_ssize_t. This applies to all platforms.

Might be worth asserting that it is no bigger than the largest number of child tokens a node may have, but only if we have an arbitrary limit for that somewhere (I *believe* that's what it's doing here, but ast.c isn't a file that I understand well).
msg336023 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2019-02-19 22:54
Fixed with commit https://github.com/python/cpython/commit/46a97920feaf4094436b2cdb32d2bd2fab3b59a5
History
Date User Action Args
2022-04-11 14:59:11adminsetgithub: 80221
2019-02-19 22:54:30pablogsalsetstatus: open -> closed

nosy: + pablogsal
messages: + msg336023

resolution: fixed
stage: patch review -> resolved
2019-02-19 22:53:17pablogsalsetkeywords: + patch
stage: patch review
pull_requests: + pull_request11973
2019-02-19 17:08:30steve.dowersetkeywords: + easy (C)

messages: + msg335981
2019-02-19 16:41:14vstinnercreate