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
_ctypes callbacks.c uses _Py_COMP_DIAG_IGNORE_DEPR_DECLS #105732
Conversation
Replace #pragma with _Py_COMP_DIAG_PUSH, _Py_COMP_DIAG_IGNORE_DEPR_DECLS and _Py_COMP_DIAG_POP to ease Python maintenance. Also add a comment explaining why callbacks.c ignores a deprecation warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patch looks good, but ...
The fallback from ffi_prep_closure_loc
to ffi_prep_closure
likely is only useful on macOS when using the system installation of libffi. On other platforms we know at compile time whether or not ffi_prep_closure_loc
is available.
It might be possible to avoid compiling the ffi_prep_closure
variant on other builds, but at first glance this will only result in even more complex preprocessor code. I can look into this in the near future, but that doesn't have to hold up this PR.
When you're done making the requested changes, leave the comment: |
I have made the requested changes; please review again. |
Thanks for making the requested changes! @ronaldoussoren: please review the changes made to this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Merged, thanks for the review! |
Replace #pragma with _Py_COMP_DIAG_PUSH,
_Py_COMP_DIAG_IGNORE_DEPR_DECLS and _Py_COMP_DIAG_POP to ease Python maintenance. Also add a comment explaining why callbacks.c ignores a deprecation warning.