-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
bpo-41100: ctypes fixes for arm64 Mac OS #21249
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
Changes from 1 commit
ff883bc
36b35bc
bacf128
971ef00
da30587
80f852b
aeac14b
62fe20a
e160a59
bca75fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -411,7 +411,7 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable, | |
| } | ||
| #if HAVE_FFI_PREP_CLOSURE_LOC | ||
| # if USING_APPLE_OS_LIBFFI | ||
| # define HAVE_FFI_PREP_CLOSURE_LOC_RUNTIME __builtin_available(macos 11, ios 13, watchos 6, tvos 13, *) | ||
| # define HAVE_FFI_PREP_CLOSURE_LOC_RUNTIME __builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *) | ||
| # else | ||
| # define HAVE_FFI_PREP_CLOSURE_LOC_RUNTIME true | ||
| # endif | ||
|
|
@@ -426,10 +426,14 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable, | |
| PyErr_Format(PyExc_NotImplementedError, "ffi_prep_closure_loc() is missing"); | ||
| goto error; | ||
| #else | ||
| #if __clang__ | ||
| #pragma clang diagnostic push | ||
| #pragma clang diagnostic ignored "-Wdeprecated-declarations" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
| #endif | ||
| result = ffi_prep_closure(p->pcl_write, &p->cif, closure_fcn, p); | ||
| #if __clang__ | ||
| #pragma clang diagnostic pop | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
| #endif | ||
| #endif | ||
| } | ||
| if (result != FFI_OK) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -840,7 +840,7 @@ static int _call_function_pointer(int flags, | |
| #endif | ||
|
|
||
| # if USING_APPLE_OS_LIBFFI | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Proposed change: #if USING_APPLE_OS_LIBFFI && HAVE_FFI_PREP_CIF_VAR This way the __builtin_available is not used when building on older macOS versions. |
||
| # define HAVE_FFI_PREP_CIF_VAR_RUNTIME __builtin_available(macos 11, ios 13, watchos 6, tvos 13, *) | ||
| # define HAVE_FFI_PREP_CIF_VAR_RUNTIME __builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *) | ||
| # elif HAVE_FFI_PREP_CIF_VAR | ||
| # define HAVE_FFI_PREP_CIF_VAR_RUNTIME true | ||
| # else | ||
|
|
||
This file was deleted.
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.
We should avoid
-Wunknown-pragmaswarnings when building on other platforms.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.
fixed