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 6d5bf66

Browse filesBrowse files
committed
sed: FFI_TYPE_COMPLEX -> FFI_TARGET_HAS_COMPLEX_TYPE
1 parent e9cab4a commit 6d5bf66
Copy full SHA for 6d5bf66

File tree

Expand file treeCollapse file tree

5 files changed

+13
-13
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+13
-13
lines changed

‎Modules/_ctypes/_ctypes.c

Copy file name to clipboardExpand all lines: Modules/_ctypes/_ctypes.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1750,7 +1750,7 @@ class _ctypes.c_void_p "PyObject *" "clinic_state_sub()->PyCSimpleType_Type"
17501750
[clinic start generated code]*/
17511751
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=dd4d9646c56f43a9]*/
17521752

1753-
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
1753+
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TARGET_HAS_COMPLEX_TYPE)
17541754
static const char SIMPLE_TYPE_CHARS[] = "cbBhHiIlLdCfuzZqQPXOv?g";
17551755
#else
17561756
static const char SIMPLE_TYPE_CHARS[] = "cbBhHiIlLdfuzZqQPXOv?g";

‎Modules/_ctypes/_ctypes_test.c

Copy file name to clipboardExpand all lines: Modules/_ctypes/_ctypes_test.c
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
#include <Python.h>
1515

16-
#include <ffi.h> // FFI_TYPE_COMPLEX
16+
#include <ffi.h> // FFI_TARGET_HAS_COMPLEX_TYPE
1717

18-
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
18+
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TARGET_HAS_COMPLEX_TYPE)
1919
# include "../_complex.h" // csqrt()
2020
# undef I // for _ctypes_test_generated.c.h
2121
#endif
@@ -449,7 +449,7 @@ EXPORT(double) my_sqrt(double a)
449449
return sqrt(a);
450450
}
451451

452-
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
452+
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TARGET_HAS_COMPLEX_TYPE)
453453
EXPORT(double complex) my_csqrt(double complex a)
454454
{
455455
return csqrt(a);

‎Modules/_ctypes/callproc.c

Copy file name to clipboardExpand all lines: Modules/_ctypes/callproc.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ module _ctypes
105105
#include "pycore_global_objects.h"// _Py_ID()
106106
#include "pycore_traceback.h" // _PyTraceback_Add()
107107

108-
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
108+
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TARGET_HAS_COMPLEX_TYPE)
109109
#include "../_complex.h" // complex
110110
#endif
111111

@@ -655,7 +655,7 @@ union result {
655655
double d;
656656
float f;
657657
void *p;
658-
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
658+
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TARGET_HAS_COMPLEX_TYPE)
659659
double complex C;
660660
#endif
661661
};

‎Modules/_ctypes/cfield.c

Copy file name to clipboardExpand all lines: Modules/_ctypes/cfield.c
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <ffi.h>
1515
#include "ctypes.h"
1616

17-
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
17+
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TARGET_HAS_COMPLEX_TYPE)
1818
# include "../_complex.h" // complex
1919
#endif
2020

@@ -1090,7 +1090,7 @@ d_get(void *ptr, Py_ssize_t size)
10901090
return PyFloat_FromDouble(val);
10911091
}
10921092

1093-
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
1093+
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TARGET_HAS_COMPLEX_TYPE)
10941094
static PyObject *
10951095
C_set(void *ptr, PyObject *value, Py_ssize_t size)
10961096
{
@@ -1619,7 +1619,7 @@ static struct fielddesc formattable[] = {
16191619
{ 'B', B_set, B_get, NULL},
16201620
{ 'c', c_set, c_get, NULL},
16211621
{ 'd', d_set, d_get, NULL, d_set_sw, d_get_sw},
1622-
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
1622+
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TARGET_HAS_COMPLEX_TYPE)
16231623
{ 'C', C_set, C_get, NULL},
16241624
#endif
16251625
{ 'g', g_set, g_get, NULL},
@@ -1672,7 +1672,7 @@ _ctypes_init_fielddesc(void)
16721672
case 'B': fd->pffi_type = &ffi_type_uchar; break;
16731673
case 'c': fd->pffi_type = &ffi_type_schar; break;
16741674
case 'd': fd->pffi_type = &ffi_type_double; break;
1675-
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
1675+
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TARGET_HAS_COMPLEX_TYPE)
16761676
case 'C': fd->pffi_type = &ffi_type_complex_double; break;
16771677
#endif
16781678
case 'g': fd->pffi_type = &ffi_type_longdouble; break;

‎Modules/_ctypes/ctypes.h

Copy file name to clipboardExpand all lines: Modules/_ctypes/ctypes.h
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
# include <alloca.h>
33
#endif
44

5-
#include <ffi.h> // FFI_TYPE_COMPLEX
5+
#include <ffi.h> // FFI_TARGET_HAS_COMPLEX_TYPE
66

77
#include "pycore_moduleobject.h" // _PyModule_GetState()
88
#include "pycore_typeobject.h" // _PyType_GetModuleState()
99

10-
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
10+
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TARGET_HAS_COMPLEX_TYPE)
1111
# include "../_complex.h" // complex
1212
#endif
1313

@@ -399,7 +399,7 @@ struct tagPyCArgObject {
399399
double d;
400400
float f;
401401
void *p;
402-
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
402+
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TARGET_HAS_COMPLEX_TYPE)
403403
double complex C;
404404
#endif
405405
} value;

0 commit comments

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