Skip to content

bpo-18407: ast.c now uses Py_ssize_t for asdl_seq_LEN() - #10655

Merged
vstinner merged 1 commit into
python:masterfrom
vstinner:ast_py_ssize_t
Nov 22, 2018
Merged

vstinner merged 1 commit into
python:masterfrom
vstinner:ast_py_ssize_t

Conversation

@vstinner

@vstinner vstinner commented Nov 22, 2018 •

Copy link
Copy Markdown
Member

When iterating using asdl_seq_LEN(), use 'Py_ssize_t' type instead of
'int', to avoid downcast on 64-bit platforms.

_Py_asdl_int_seq_new() now also ensures that the index is greater or
equal than 0.

https://bugs.python.org/issue18407

When iterating using asdl_seq_LEN(), use 'Py_ssize_t' type instead of
'int', to avoid downcast on 64-bit platforms.

_Py_asdl_int_seq_new() now also ensures that the index is greater or
equal than 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants