[3.14] gh-125206: Make _Py_FFI_SUPPORT_C_COMPLEX private (GH-135932) by miss-islington · Pull Request #135973 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Modules/_ctypes/_ctypes_test.c
4 changes: 2 additions & 2 deletions Modules/_ctypes/cfield.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ d_get(void *ptr, Py_ssize_t size)
return PyFloat_FromDouble(val);
}

#if defined(Py_FFI_SUPPORT_C_COMPLEX)
#if defined(_Py_FFI_SUPPORT_C_COMPLEX)

/* We don't use _Complex types here, using arrays instead, as the C11+
standard says: "Each complex type has the same representation and alignment
Expand Down Expand Up @@ -1599,7 +1599,7 @@ for base_code, base_c_type in [
///////////////////////////////////////////////////////////////////////////

TABLE_ENTRY_SW(d, &ffi_type_double);
#if defined(Py_FFI_SUPPORT_C_COMPLEX)
#if defined(_Py_FFI_SUPPORT_C_COMPLEX)
if (Py_FFI_COMPLEX_AVAILABLE) {
TABLE_ENTRY(D, &ffi_type_complex_double);
TABLE_ENTRY(F, &ffi_type_complex_float);
Expand Down
2 changes: 1 addition & 1 deletion Modules/_ctypes/ctypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

// Do we support C99 complex types in ffi?
// For Apple's libffi, this must be determined at runtime (see gh-128156).
#if defined(Py_FFI_SUPPORT_C_COMPLEX)
#if defined(_Py_FFI_SUPPORT_C_COMPLEX)
# if USING_APPLE_OS_LIBFFI && defined(__has_builtin)
# if __has_builtin(__builtin_available)
# define Py_FFI_COMPLEX_AVAILABLE __builtin_available(macOS 10.15, *)
Expand Down
2 changes: 1 addition & 1 deletion configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4163,7 +4163,7 @@ int main(void)
[ac_cv_ffi_complex_double_supported=no])
])])
if test "$ac_cv_ffi_complex_double_supported" = "yes"; then
AC_DEFINE([Py_FFI_SUPPORT_C_COMPLEX], [1],
AC_DEFINE([_Py_FFI_SUPPORT_C_COMPLEX], [1],
[Defined if _Complex C type can be used with libffi.])
fi

Expand Down
6 changes: 3 additions & 3 deletions pyconfig.h.in