-
Notifications
You must be signed in to change notification settings - Fork 224
Use Py_SET_SIZE() function #330
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
Conversation
Replace "Py_TYPE(obj)=type;" with "Py_SET_SIZE(obj, type);". The Py_SET_SIZE() was added to Python 3.9: copy pythoncapi_compat.h header to src/object/. The file comes from the project: https://github.com/pythoncapi/pythoncapi_compat On Python 3.10, Py_SET_SIZE() should now be used rather than using Py_TYPE() as an l-value: https://docs.python.org/dev/c-api/structures.html#c.Py_TYPE Context: https://bugs.python.org/issue39573
|
See also #329 |
|
This looks like a duplicate of #328, doesn't it ? |
|
Aren't you referring to #329 instead ? |
Oh wait, ignore my previous comment. I wrote 2 PRs and I didn't notice that you're a talking about a 3rd PR. Yes, #328 is the same fix, but it doesn't use pythoncapi_compat.h. I propose to use it to avoid having to reimplemented the compatibility layer for old Python versions: pythoncapi_compat.h uses static inline functions rather than macros. |
|
Fedora uses a downstream patch to fix issue: https://src.fedoraproject.org/rpms/boost/blob/master/f/boost-1.73-python3.10.patch Copy of the boost specfile: |
This job failed because it failed to locate the C++ compiler, whereas the two other AppVeyor jobs passed: |
|
Closed as obsolete. |
Replace "Py_TYPE(obj)=type;" with "Py_SET_SIZE(obj, type);". The
Py_SET_SIZE() was added to Python 3.9: copy pythoncapi_compat.h
header to src/object/. The file comes from the project:
https://github.com/pythoncapi/pythoncapi_compat
On Python 3.10, Py_SET_SIZE() should now be used rather than using
Py_TYPE() as an l-value:
https://docs.python.org/dev/c-api/structures.html#c.Py_TYPE
Context: https://bugs.python.org/issue39573