Skip to content

bpo-40958: Avoid 'possible loss of data' build warning on Windows#20968

Closed
lysnikolaou wants to merge 1 commit intopython:masterfrom
lysnikolaou:windows-build-warnings
Closed

bpo-40958: Avoid 'possible loss of data' build warning on Windows#20968
lysnikolaou wants to merge 1 commit intopython:masterfrom
lysnikolaou:windows-build-warnings

Conversation

@lysnikolaou
Copy link
Member

@lysnikolaou lysnikolaou commented Jun 18, 2020


return Constant(c, NULL, t->lineno, t->col_offset, t->end_lineno, t->end_col_offset,
p->arena);
return Constant(c, NULL, (int) t->lineno, (int) t->col_offset, (int) t->end_lineno,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh..... I am not a fan of having to do these castings everywhere. I think we should either revert the Py_ssize_t change or adapt the AST C types to use Py_ssize_t instead of integers for these attributes. What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I'm not sure what I would go with. Probably just revert the Py_ssize_ts in the Token struct.

Copy link
Member

@pablogsal pablogsal Jun 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think that would be better for now. I will investigate how much would entail adapting the AST structs, but that likely will need more discussion with other core devs, because it will affect downstream code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right! I'll close this PR then and open a new one.

@lysnikolaou lysnikolaou deleted the windows-build-warnings branch June 18, 2020 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants