8000 gh-61103: drop unused Py_HAVE_C_COMPLEX define by skirpichev · Pull Request #133435 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-61103: drop unused Py_HAVE_C_COMPLEX define #133435

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

Merged
merged 1 commit into from
May 5, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# define _Py_thread_local __thread
#endif

#if defined(Py_HAVE_C_COMPLEX) && 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 Down Expand Up @@ -457,7 +457,7 @@ EXPORT(double) my_sqrt(double a)
return sqrt(a);
}

#if defined(Py_HAVE_C_COMPLEX) && 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
47 changes: 0 additions & 47 deletions configure

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

29 changes: 0 additions & 29 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3838,35 +3838,6 @@ dnl The AIX_BUILDDATE is obtained from the kernel fileset - bos.mp64
*) ;;
esac

# check for _Complex C type
#
# Note that despite most compilers define __STDC_IEC_559_COMPLEX__ - almost
# none properly support C11+ Annex G (where pure imaginary types
# represented by _Imaginary are mandatory). This is a bug (see e.g.
# llvm/llvm-project#60269), so we don't rely on presence
# of __STDC_IEC_559_COMPLEX__.
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <complex.h>
#define test(type, out) \
{ \
type complex z = 1 + 2*I; z = z*z; \
(out) = (out) || creal(z) != -3 || cimag(z) != 4; \
}
int main(void)
{
int res = 0;
test(float, res);
test(double, res);
test(long double, res);
return res;
}]])], [ac_cv_c_complex_supported=yes],
[ac_cv_c_complex_supported=no],
[ac_cv_c_complex_supported=no])
if test "$ac_cv_c_complex_supported" = "yes"; then
AC_DEFINE([Py_HAVE_C_COMPLEX], [1],
[Defined if _Complex C type is available.])
fi

# check for systems that require aligned memory access
AC_CACHE_CHECK([aligned memory access is required], [ac_cv_aligned_required],
[AC_RUN_IFELSE([AC_LANG_SOURCE([[
Expand Down
3 changes: 0 additions & 3 deletions pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1730,9 +1730,6 @@
SipHash13: 3, externally defined: 0 */
#undef Py_HASH_ALGORITHM

/* Defined if _Complex C type is available. */
#undef Py_HAVE_C_COMPLEX

/* Define if year with century should be normalized for strftime. */
#undef Py_NORMALIZE_CENTURY

Expand Down
Loading
0