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

Appearance settings

Commit 1bc1650

Browse filesBrowse files
authored
gh-61103: drop unused Py_HAVE_C_COMPLEX define (GH-133435)
Py_HAVE_C_COMPLEX was added in 3.14 so the removal doesn't need a deprecation period even under a strict reading of PEP 387. The Py_FFI_SUPPORT_C_COMPLEX check configure check implies support for complex types in ctypes.
1 parent 59f78d7 commit 1bc1650
Copy full SHA for 1bc1650

File tree

Expand file treeCollapse file tree

4 files changed

+2
-81
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+2
-81
lines changed

‎Modules/_ctypes/_ctypes_test.c

Copy file name to clipboardExpand all lines: Modules/_ctypes/_ctypes_test.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# define _Py_thread_local __thread
2424
#endif
2525

26-
#if defined(Py_HAVE_C_COMPLEX) && defined(Py_FFI_SUPPORT_C_COMPLEX)
26+
#if defined(Py_FFI_SUPPORT_C_COMPLEX)
2727
# include <complex.h> // csqrt()
2828
# undef I // for _ctypes_test_generated.c.h
2929
#endif
@@ -457,7 +457,7 @@ EXPORT(double) my_sqrt(double a)
457457
return sqrt(a);
458458
}
459459

460-
#if defined(Py_HAVE_C_COMPLEX) && defined(Py_FFI_SUPPORT_C_COMPLEX)
460+
#if defined(Py_FFI_SUPPORT_C_COMPLEX)
461461
EXPORT(double complex) my_csqrt(double complex a)
462462
{
463463
return csqrt(a);

‎configure

Copy file name to clipboardExpand all lines: configure
-47Lines changed: 0 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎configure.ac

Copy file name to clipboardExpand all lines: configure.ac
-29Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3838,35 +3838,6 @@ dnl The AIX_BUILDDATE is obtained from the kernel fileset - bos.mp64
38383838
*) ;;
38393839
esac
38403840

3841-
# check for _Complex C type
3842-
#
3843-
# Note that despite most compilers define __STDC_IEC_559_COMPLEX__ - almost
3844-
# none properly support C11+ Annex G (where pure imaginary types
3845-
# represented by _Imaginary are mandatory). This is a bug (see e.g.
3846-
# llvm/llvm-project#60269), so we don't rely on presence
3847-
# of __STDC_IEC_559_COMPLEX__.
3848-
AC_RUN_IFELSE([AC_LANG_SOURCE([[
3849-
#include <complex.h>
3850-
#define test(type, out) \
3851-
{ \
3852-
type complex z = 1 + 2*I; z = z*z; \
3853-
(out) = (out) || creal(z) != -3 || cimag(z) != 4; \
3854-
}
3855-
int main(void)
3856-
{
3857-
int res = 0;
3858-
test(float, res);
3859-
test(double, res);
3860-
test(long double, res);
3861-
return res;
3862-
}]])], [ac_cv_c_complex_supported=yes],
3863-
[ac_cv_c_complex_supported=no],
3864-
[ac_cv_c_complex_supported=no])
3865-
if test "$ac_cv_c_complex_supported" = "yes"; then
3866-
AC_DEFINE([Py_HAVE_C_COMPLEX], [1],
3867-
[Defined if _Complex C type is available.])
3868-
fi
3869-
38703841
# check for systems that require aligned memory access
38713842
AC_CACHE_CHECK([aligned memory access is required], [ac_cv_aligned_required],
38723843
[AC_RUN_IFELSE([AC_LANG_SOURCE([[

‎pyconfig.h.in

Copy file name to clipboardExpand all lines: pyconfig.h.in
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,9 +1730,6 @@
17301730
SipHash13: 3, externally defined: 0 */
17311731
#undef Py_HASH_ALGORITHM
17321732

1733-
/* Defined if _Complex C type is available. */
1734-
#undef Py_HAVE_C_COMPLEX
1735-
17361733
/* Define if year with century should be normalized for strftime. */
17371734
#undef Py_NORMALIZE_CENTURY
17381735

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.