-
Notifications
You must be signed in to change notification settings - Fork 188
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
python: enum: fix build for Python 3.11 #231
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sgn
force-pushed
the
fix-python-3.11
branch
2 times, most recently
from
September 21, 2022 03:52
e28a379
to
f63c07c
Compare
Python 3.9 introduced Py_SET_SIZE function to set size instead of relying on Py_SIZE() as a macro [3.9]. Python 3.10 started to encourage to use Py_SET_SIZE instead of assigning into return value of Py_SIZE [3.10]. Python 3.11 flips the switch, turn Py_SIZE into a function [3.11], thus Py_SIZE(obj) will be a rvalue. We need to use Py_SET_SIZE to set size now. [3.9]: https://docs.python.org/3.9/c-api/structures.html#c.Py_SET_SIZE [3.10]: https://docs.python.org/3.10/c-api/structures.html#c.Py_SIZE [3.11]: https://docs.python.org/3.11/c-api/structures.html#c.Py_SIZE Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
jameshilliard
approved these changes
Oct 26, 2022
@mchehab Could we get this merged and a new release made as python 3.11 was just released? |
Would be glad to see a hotfix / tag / release targeting python3.11 since the upcoming Debian 12 is on pursuit to ship python3.11. |
archlinux-github
pushed a commit
to archlinux/svntogit-packages
that referenced
this pull request
Apr 6, 2023
Add backport of upstreamed patch, as upstream seems to be defunct: mchehab/zbar#231 git-svn-id: file:///srv/repos/svn-packages/svn@472846 eb2447ed-0c53-47e4-bac8-5bc4a241df78
archlinux-github
pushed a commit
to archlinux/svntogit-packages
that referenced
this pull request
Apr 6, 2023
Add backport of upstreamed patch, as upstream seems to be defunct: mchehab/zbar#231 git-svn-id: file:///srv/repos/svn-packages/svn@472846 eb2447ed-0c53-47e4-bac8-5bc4a241df78
Patch merged, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Python 3.9 introduced Py_SET_SIZE function to set size instead of relying on Py_SIZE() as a macro 3.9.
Python 3.10 started to encourage to use Py_SET_SIZE instead of assigning into return value of Py_SIZE 3.10.
Python 3.11 flips the switch, turn Py_SIZE into a function 3.11, thus Py_SIZE(obj) will be a rvalue. We need to use Py_SET_SIZE to set size now.