Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-125206: Make _Py_FFI_SUPPORT_C_COMPLEX private#135932

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall 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 deletionsModules/_ctypes/_ctypes_test.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@
# define _Py_thread_local __thread
#endif

#if defined(Py_FFI_SUPPORT_C_COMPLEX)
#if defined(_Py_FFI_SUPPORT_C_COMPLEX)
# include <complex.h> // csqrt()
# undef I // for _ctypes_test_generated.c.h
#endif
Expand DownExpand Up@@ -457,7 +457,7 @@ EXPORT(double) my_sqrt(double a)
return sqrt(a);
}

#if defined(Py_FFI_SUPPORT_C_COMPLEX)
#if defined(_Py_FFI_SUPPORT_C_COMPLEX)
EXPORT(double complex) my_csqrt(double complex a)
{
return csqrt(a);
Expand Down
4 changes: 2 additions & 2 deletionsModules/_ctypes/cfield.c
View file
Open in desktop
Original file line numberDiff line numberDiff 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 DownExpand 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 deletionModules/_ctypes/ctypes.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,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 deletionconfigure
View file
Open in desktop

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

2 changes: 1 addition & 1 deletionconfigure.ac
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionspyconfig.h.in
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1736,9 +1736,6 @@
/* Defined if Python is built as a shared library. */
#undef Py_ENABLE_SHARED

/* Defined if _Complex C type can be used with libffi. */
#undef Py_FFI_SUPPORT_C_COMPLEX

/* Define if you want to disable the GIL */
#undef Py_GIL_DISABLED

Expand DownExpand Up@@ -2026,6 +2023,9 @@
/* Maximum length in bytes of a thread name */
#undef _PYTHREAD_NAME_MAXLEN

/* Defined if _Complex C type can be used with libffi. */
#undef _Py_FFI_SUPPORT_C_COMPLEX

/* Define to force use of thread-safe errno, h_errno, and other functions */
#undef _REENTRANT

Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp