Skip to content

[3.7] bpo-9566: Fix compiler warnings on Windows #12920

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Apr 23, 2019
Merged

[3.7] bpo-9566: Fix compiler warnings on Windows #12920

merged 4 commits into from
Apr 23, 2019

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Apr 23, 2019

Backport changes from master:

https://bugs.python.org/issue9566

jkloth and others added 4 commits April 23, 2019 10:03
Change PyDTrace_GC_DONE() argument type from int to Py_ssize_t.

(cherry picked from commit edad38e)
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.

(cherry picked from commit fb7e799)
Use the _PyTime_t type and round away from zero (ROUND_UP,
_PyTime_ROUND_TIMEOUT) the sleep duration, when converting a Python
object to seconds and then to milliseconds. Raise an OverflowError in
case of overflow.

Previously the (int)double conversion rounded towards zero
(ROUND_DOWN).

(cherry picked from commit ca40501)
@vstinner vstinner changed the title [3.7] Fix compiler warnings on Windows [3.7] bpo-9566: Fix compiler warnings on Windows Apr 23, 2019
@vstinner vstinner merged commit 8a9a6b4 into python:3.7 Apr 23, 2019
@vstinner vstinner deleted the fix_win_warn37 branch April 23, 2019 08:26
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants