summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-10-14 14:36:17 +1100
committerDamien George <damien@micropython.org>2022-10-14 14:36:17 +1100
commit89b320737652829edbab921e86d7ad3962d86d9e (patch)
tree76422dbe678ec0d194c1d21633ad29e3bf661ab1
parentab317a0d66005ea88f162994130f61d0d488db93 (diff)
unix/modffi: Move header includes inside MICROPY_PY_FFI guard.
So ffi.h is not needed if this module is disabled. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/unix/modffi.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/ports/unix/modffi.c b/ports/unix/modffi.c
index 3df748b80..bc585f864 100644
--- a/ports/unix/modffi.c
+++ b/ports/unix/modffi.c
@@ -25,13 +25,6 @@
* THE SOFTWARE.
*/
-#include <assert.h>
-#include <string.h>
-#include <errno.h>
-#include <dlfcn.h>
-#include <ffi.h>
-#include <stdint.h>
-
#include "py/runtime.h"
#include "py/binary.h"
#include "py/mperrno.h"
@@ -40,6 +33,12 @@
#if MICROPY_PY_FFI
+#include <assert.h>
+#include <string.h>
+#include <errno.h>
+#include <dlfcn.h>
+#include <ffi.h>
+
/*
* modffi uses character codes to encode a value type, based on "struct"
* module type codes, with some extensions and overridings.