Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

bpo-44378: Fix a compiler warning in Py_IS_TYPE() #26644

Merged
merged 1 commit into from Jun 11, 2021

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Jun 10, 2021

Py_IS_TYPE() no longer uses Py_TYPE() to avoid a compiler when
casting "const PyObject*" to "PyObject*".

https://bugs.python.org/issue44378

@vstinner
Copy link
Member Author

vstinner commented Jun 10, 2021

Copy link
Member

@corona10 corona10 left a comment

lgtm thanks for the work :)

@@ -0,0 +1,2 @@
:c:func:`Py_IS_TYPE` no longer uses :c:func:`Py_TYPE` to avoid a compiler
Copy link
Contributor

@hroncok hroncok Jun 10, 2021

Choose a reason for hiding this comment

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

Suggested change
:c:func:`Py_IS_TYPE` no longer uses :c:func:`Py_TYPE` to avoid a compiler
:c:func:`Py_IS_TYPE` no longer uses :c:func:`Py_TYPE` to avoid a compiler warning

Copy link
Member Author

@vstinner vstinner Jun 11, 2021

Choose a reason for hiding this comment

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

Oops, fixed! I also rewrote the commit message.

Py_IS_TYPE() no longer uses Py_TYPE() to avoid a compiler warning:
no longer cast "const PyObject*" to "PyObject*".
@vstinner vstinner merged commit 304dfec into python:main Jun 11, 2021
13 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented Jun 11, 2021

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒🤖

@vstinner vstinner deleted the is_type branch Jun 11, 2021
@bedevere-bot
Copy link

bedevere-bot commented Jun 11, 2021

GH-26668 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 11, 2021
Py_IS_TYPE() no longer uses Py_TYPE() to avoid a compiler warning:
no longer cast "const PyObject*" to "PyObject*".
(cherry picked from commit 304dfec)

Co-authored-by: Victor Stinner <vstinner@python.org>
miss-islington added a commit that referenced this pull request Jun 11, 2021
Py_IS_TYPE() no longer uses Py_TYPE() to avoid a compiler warning:
no longer cast "const PyObject*" to "PyObject*".
(cherry picked from commit 304dfec)

Co-authored-by: Victor Stinner <vstinner@python.org>
@vstinner
Copy link
Member Author

vstinner commented Jun 11, 2021

Merged into 3.10 and main branches, thanks for your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants