Uh oh!
There was an error while loading. Please reload this page.
gh-61103: don't use native complex types in ctypes - #133237
Conversation
…struct module Each complex type interpreted as an array type containing exactly two elements of the corresponding real type (real and imaginary parts, respectively).
skirpichev
commented
May 1, 2025
…ctypes * drop _complex.h header * use appropriate real arrays to replace complex types
efbe0bb to
6a20fafCompareUh oh!
There was an error while loading. Please reload this page.
@skirpichev Thanks, it looks great. IMHO, and despite your doubts about worthiness, this should be merged. Things are simpler now, you removed lots of code, and a private header.
|
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Lisandro Dalcin <dalcinl@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
…ue2nK.rst Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
bedevere-bot
commented
May 2, 2025
🤖 New build scheduled with the buildbot fleet by @encukou for commit 071d57e 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F133237%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
encukou
left a comment
There was a problem hiding this comment.
LGTM, merge if the buildbots don't complain.
skirpichev
commented
May 2, 2025
encukou
commented
May 2, 2025
Ah, I missed that note, sorry! |
skirpichev
commented
May 2, 2025
Done. See also minor docs correction in #133249 |
skirpichev
commented
May 2, 2025
Failure in test_frame.py on s390x seems unrelated. |
skirpichev
commented
May 4, 2025
All failures are related to test_frame.py. @encukou, I left here only one change, related to the struct module (cosmetic change in |
skirpichev
commented
May 4, 2025
@dalcinl, let us know if you think that linked issue should stay open after merging this. |
dalcinl
commented
May 4, 2025
@skirpichev I think you can close it. AFAICT, all concerns have been addressed. Many thanks for your hard work in implementing all these changes. |
…es (pythonGH-133237) According to the C standard, the memory representation of _Complex types is equivalent to 2-element arrays. Unlike _Complex, arrays are always available. - drop _complex.h header - use appropriate real arrays to replace complex types Co-authored-by: Lisandro Dalcin <dalcinl@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
📚 Documentation preview 📚: https://cpython-previews--133237.org.readthedocs.build/
Note, that
Py_FFI_SUPPORT_C_COMPLEXcheck configure check imply support for complex types. So,Py_HAVE_C_COMPLEXcheck is redundant. Though, I'm not sure if it worth removing.