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

gh-128156: Guard use of ffi_type_complex_double on macOS system libffi #128680

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

encukou
Copy link
Member

@encukou encukou commented Jan 9, 2025

formattable.fmt{C,E,F} now have a runtime guard (if USING_APPLE_OS_LIBFFI).
The list of type codes (previously SIMPLE_TYPE_CHARS) is now generated at runtime.


📚 Documentation preview 📚: https://cpython-previews--128680.org.readthedocs.build/

Copy link
Member

@skirpichev skirpichev left a comment

Choose a reason for hiding this comment

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

Looks good, but we need some feedback from MacOS experts.

TABLE_ENTRY(C, &ffi_type_complex_double);
TABLE_ENTRY(E, &ffi_type_complex_float);
TABLE_ENTRY(F, &ffi_type_complex_longdouble);
if (Py_FFI_COMPLEX_AVAILABLE) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe you rather should move all runtime logic for Py_FFI_COMPLEX_AVAILABLE to this place, together with a comment why (and when) we need this. And when it might be removed.

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

Successfully merging this pull request may close these issues.

2 participants