Skip to content

Commit 388e2ca

Browse files
committed
+ missing ffi.h imports
1 parent 5a7e366 commit 388e2ca

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

Modules/_ctypes/_ctypes_test.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
#include <Python.h>
1515

16+
#include <ffi.h> // FFI_TYPE_COMPLEX
17+
1618
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
1719
# include "../_complex.h" // csqrt()
1820
# undef I // for _ctypes_test_generated.c.h

Modules/_ctypes/cfield.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
#include "pycore_bitutils.h" // _Py_bswap32()
1212
#include "pycore_call.h" // _PyObject_CallNoArgs()
1313

14-
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
15-
# include "../_complex.h" // complex
16-
#endif
17-
1814
#include <ffi.h>
1915
#include "ctypes.h"
2016

17+
#if defined(Py_HAVE_C_COMPLEX) && defined(FFI_TYPE_COMPLEX)
18+
# include "../_complex.h" // complex
19+
#endif
2120

2221
#define CTYPES_CFIELD_CAPSULE_NAME_PYMEM "_ctypes/cfield.c pymem"
2322

Modules/_ctypes/ctypes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# include <alloca.h>
33
#endif
44

5+
#include <ffi.h> // FFI_TYPE_COMPLEX
6+
57
#include "pycore_moduleobject.h" // _PyModule_GetState()
68
#include "pycore_typeobject.h" // _PyType_GetModuleState()
79

0 commit comments

Comments
 (0)