diff --git a/py/asmthumb.c b/py/asmthumb.c index 1e6c23e2ee71..3fcd28a91d34 100644 --- a/py/asmthumb.c +++ b/py/asmthumb.c @@ -1,4 +1,3 @@ -#include #include #include #include diff --git a/py/binary.c b/py/binary.c index 20b38b8b148a..7a8ed46111f2 100644 --- a/py/binary.c +++ b/py/binary.c @@ -1,4 +1,3 @@ -#include #include #include diff --git a/py/builtin.c b/py/builtin.c index df488e054a14..2e0627fa5fc7 100644 --- a/py/builtin.c +++ b/py/builtin.c @@ -1,8 +1,4 @@ -#include -#include #include -#include -#include #include #include "nlr.h" diff --git a/py/builtinevex.c b/py/builtinevex.c index 6e920e85f075..d658db0adfb7 100644 --- a/py/builtinevex.c +++ b/py/builtinevex.c @@ -1,9 +1,4 @@ #include -#include -#include -#include -#include -#include #include "nlr.h" #include "misc.h" diff --git a/py/builtinimport.c b/py/builtinimport.c index 7cbb46012b46..2b9b3a30b994 100644 --- a/py/builtinimport.c +++ b/py/builtinimport.c @@ -1,7 +1,6 @@ #include #include #include -#include #include #include diff --git a/py/builtinmath.c b/py/builtinmath.c index 35c1e45edc19..eeb715048a78 100644 --- a/py/builtinmath.c +++ b/py/builtinmath.c @@ -1,4 +1,3 @@ -#include #include #include "misc.h" diff --git a/py/builtinmp.c b/py/builtinmp.c index 22091f4ea540..3b73517963cd 100644 --- a/py/builtinmp.c +++ b/py/builtinmp.c @@ -1,4 +1,3 @@ -#include #include "misc.h" #include "mpconfig.h" diff --git a/py/compile.c b/py/compile.c index d1aec3095804..bb688d5d8e81 100644 --- a/py/compile.c +++ b/py/compile.c @@ -1,5 +1,4 @@ -#include -#include +#include #include #include #include diff --git a/py/emitbc.c b/py/emitbc.c index b26da0e706d2..ef5da3a622e8 100644 --- a/py/emitbc.c +++ b/py/emitbc.c @@ -1,5 +1,4 @@ -#include -#include +#include #include #include #include diff --git a/py/emitcommon.c b/py/emitcommon.c index ff6457289a37..f7494668e00e 100644 --- a/py/emitcommon.c +++ b/py/emitcommon.c @@ -1,7 +1,5 @@ #include -#include #include -#include #include #include "misc.h" diff --git a/py/emitcpy.c b/py/emitcpy.c index b31425f2ec0b..afd5a5af9445 100644 --- a/py/emitcpy.c +++ b/py/emitcpy.c @@ -1,5 +1,4 @@ -#include -#include +#include #include #include #include diff --git a/py/emitinlinethumb.c b/py/emitinlinethumb.c index 675ed1efc893..55af97f83520 100644 --- a/py/emitinlinethumb.c +++ b/py/emitinlinethumb.c @@ -1,5 +1,3 @@ -#include -#include #include #include #include diff --git a/py/emitnative.c b/py/emitnative.c index df531af6b1a8..3ed415b04c0d 100644 --- a/py/emitnative.c +++ b/py/emitnative.c @@ -16,8 +16,7 @@ // for x in l[0:8]: can be compiled into a native loop if l has pointer type -#include -#include +#include #include #include #include diff --git a/py/emitpass1.c b/py/emitpass1.c index d4926523998f..e4dbf1412199 100644 --- a/py/emitpass1.c +++ b/py/emitpass1.c @@ -1,8 +1,5 @@ -#include #include #include -#include -#include #include #include "misc.h" diff --git a/py/formatfloat.c b/py/formatfloat.c index e42266a71492..83aee1ef7494 100644 --- a/py/formatfloat.c +++ b/py/formatfloat.c @@ -13,7 +13,6 @@ ***********************************************************************/ -#include #include #include "mpconfig.h" diff --git a/py/gc.c b/py/gc.c index e0941af01ff8..67f1e810e00e 100644 --- a/py/gc.c +++ b/py/gc.c @@ -1,6 +1,5 @@ #include #include -#include #include #include "mpconfig.h" diff --git a/py/lexer.c b/py/lexer.c index 26fec121c12b..58d54b698060 100644 --- a/py/lexer.c +++ b/py/lexer.c @@ -1,9 +1,9 @@ /* lexer.c -- simple tokeniser for Python implementation */ +#include #include #include -#include #include #include "misc.h" diff --git a/py/lexerstr.c b/py/lexerstr.c index 634aa42acd06..a2168c96c196 100644 --- a/py/lexerstr.c +++ b/py/lexerstr.c @@ -1,5 +1,3 @@ -#include -#include #include "misc.h" #include "mpconfig.h" diff --git a/py/lexerunix.c b/py/lexerunix.c index fb62d3d72f44..73d30f24769e 100644 --- a/py/lexerunix.c +++ b/py/lexerunix.c @@ -1,4 +1,3 @@ -#include #include #include #include @@ -11,6 +10,9 @@ #if MICROPY_ENABLE_LEXER_UNIX +#include +#include + mp_lexer_t *mp_lexer_new_from_file(const char *filename) { int fd = open(filename, O_RDONLY); if (fd < 0) { diff --git a/py/malloc.c b/py/malloc.c index 27eaac108826..504db4b1b9ca 100644 --- a/py/malloc.c +++ b/py/malloc.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/py/map.c b/py/map.c index f41152703ea2..d1c368c6aec3 100644 --- a/py/map.c +++ b/py/map.c @@ -1,6 +1,4 @@ -#include #include -#include #include "misc.h" #include "mpconfig.h" diff --git a/py/obj.c b/py/obj.c index 0f36ef5690a5..e98dbae6cfce 100644 --- a/py/obj.c +++ b/py/obj.c @@ -1,8 +1,5 @@ -#include -#include #include #include -#include #include #include "nlr.h" diff --git a/py/objarray.c b/py/objarray.c index d0b3e003b892..ee43bde9601b 100644 --- a/py/objarray.c +++ b/py/objarray.c @@ -1,7 +1,4 @@ -#include -#include #include -#include #include #include "nlr.h" diff --git a/py/objbool.c b/py/objbool.c index 1dc5e5760ebd..9b4af2a31db4 100644 --- a/py/objbool.c +++ b/py/objbool.c @@ -1,5 +1,3 @@ -#include -#include #include "nlr.h" #include "misc.h" diff --git a/py/objboundmeth.c b/py/objboundmeth.c index 0b5fc10a0749..1b9ac61f24a0 100644 --- a/py/objboundmeth.c +++ b/py/objboundmeth.c @@ -1,7 +1,4 @@ -#include -#include #include -#include #include "nlr.h" #include "misc.h" diff --git a/py/objcell.c b/py/objcell.c index 3666617474bf..a6922b018a5e 100644 --- a/py/objcell.c +++ b/py/objcell.c @@ -1,6 +1,3 @@ -#include -#include -#include #include "nlr.h" #include "misc.h" diff --git a/py/objclosure.c b/py/objclosure.c index e2de0e04519b..cd8129e24f99 100644 --- a/py/objclosure.c +++ b/py/objclosure.c @@ -1,7 +1,4 @@ -#include -#include #include -#include #include "nlr.h" #include "misc.h" diff --git a/py/objcomplex.c b/py/objcomplex.c index bba89daf0085..65957cbf60dc 100644 --- a/py/objcomplex.c +++ b/py/objcomplex.c @@ -1,6 +1,4 @@ #include -#include -#include #include #include "nlr.h" diff --git a/py/objdict.c b/py/objdict.c index 31a80bd6cb2a..17cc499c5e57 100644 --- a/py/objdict.c +++ b/py/objdict.c @@ -1,5 +1,4 @@ -#include -#include +#include #include #include diff --git a/py/objenumerate.c b/py/objenumerate.c index 1c858ff56fb2..1862eb74e194 100644 --- a/py/objenumerate.c +++ b/py/objenumerate.c @@ -1,4 +1,3 @@ -#include #include #include "misc.h" diff --git a/py/objexcept.c b/py/objexcept.c index 532ca4320a53..11177724da8a 100644 --- a/py/objexcept.c +++ b/py/objexcept.c @@ -1,5 +1,3 @@ -#include -#include #include #include #include diff --git a/py/objfilter.c b/py/objfilter.c index dc400f1a2fd5..ea76b990706f 100644 --- a/py/objfilter.c +++ b/py/objfilter.c @@ -1,4 +1,3 @@ -#include #include #include "nlr.h" diff --git a/py/objfloat.c b/py/objfloat.c index 04d12780147a..401c1145ee38 100644 --- a/py/objfloat.c +++ b/py/objfloat.c @@ -1,6 +1,4 @@ #include -#include -#include #include #include "nlr.h" diff --git a/py/objfun.c b/py/objfun.c index 361df1914559..7d49f18da4fa 100644 --- a/py/objfun.c +++ b/py/objfun.c @@ -1,5 +1,5 @@ +#include #include -#include #include #include diff --git a/py/objgenerator.c b/py/objgenerator.c index 6a03af856bc5..8c4bb595f167 100644 --- a/py/objgenerator.c +++ b/py/objgenerator.c @@ -1,6 +1,4 @@ #include -#include -#include #include #include "nlr.h" diff --git a/py/objgetitemiter.c b/py/objgetitemiter.c index bf466c05d936..08ef66f29f10 100644 --- a/py/objgetitemiter.c +++ b/py/objgetitemiter.c @@ -1,5 +1,3 @@ -#include -#include #include "nlr.h" #include "misc.h" diff --git a/py/objint.c b/py/objint.c index 7a9b0366dbc4..9cba1ce7444d 100644 --- a/py/objint.c +++ b/py/objint.c @@ -1,6 +1,4 @@ -#include #include -#include #include #include "nlr.h" diff --git a/py/objint_longlong.c b/py/objint_longlong.c index eca2951be670..58c2466fd056 100644 --- a/py/objint_longlong.c +++ b/py/objint_longlong.c @@ -1,7 +1,5 @@ #include #include -#include -#include #include "nlr.h" #include "misc.h" diff --git a/py/objint_mpz.c b/py/objint_mpz.c index e8e8b8547298..8b7ed78a2c7e 100644 --- a/py/objint_mpz.c +++ b/py/objint_mpz.c @@ -1,7 +1,5 @@ -#include #include #include -#include #include "nlr.h" #include "misc.h" diff --git a/py/objlist.c b/py/objlist.c index aa082ea34bf6..f43670d60373 100644 --- a/py/objlist.c +++ b/py/objlist.c @@ -1,5 +1,3 @@ -#include -#include #include #include diff --git a/py/objmap.c b/py/objmap.c index cbaef6fb9a94..2b356ec4ea13 100644 --- a/py/objmap.c +++ b/py/objmap.c @@ -1,4 +1,3 @@ -#include #include #include "nlr.h" diff --git a/py/objmodule.c b/py/objmodule.c index 791932dc7f2f..e0778b4cf272 100644 --- a/py/objmodule.c +++ b/py/objmodule.c @@ -1,6 +1,4 @@ #include -#include -#include #include #include "nlr.h" diff --git a/py/objnone.c b/py/objnone.c index 489d34d138ca..a4370efebce2 100644 --- a/py/objnone.c +++ b/py/objnone.c @@ -1,5 +1,4 @@ #include -#include #include "nlr.h" #include "misc.h" diff --git a/py/objrange.c b/py/objrange.c index 80c592838555..f80bc08602e5 100644 --- a/py/objrange.c +++ b/py/objrange.c @@ -1,5 +1,3 @@ -#include -#include #include "nlr.h" #include "misc.h" diff --git a/py/objset.c b/py/objset.c index aea107fc1ca2..437bae9bf840 100644 --- a/py/objset.c +++ b/py/objset.c @@ -1,5 +1,4 @@ -#include -#include +#include #include #include diff --git a/py/objslice.c b/py/objslice.c index 10df671fea04..46cce264a9f2 100644 --- a/py/objslice.c +++ b/py/objslice.c @@ -1,6 +1,4 @@ #include -#include -#include #include #include "nlr.h" diff --git a/py/objstr.c b/py/objstr.c index 64ba6c5fad1f..9762b0efd2b0 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -1,6 +1,4 @@ -#include -#include -#include +#include #include #include diff --git a/py/objtuple.c b/py/objtuple.c index 827441f704db..83d1f21ceaee 100644 --- a/py/objtuple.c +++ b/py/objtuple.c @@ -1,6 +1,4 @@ #include -#include -#include #include #include "nlr.h" diff --git a/py/objtype.c b/py/objtype.c index 6480a99f6c89..4898c5ccb496 100644 --- a/py/objtype.c +++ b/py/objtype.c @@ -1,5 +1,3 @@ -#include -#include #include #include diff --git a/py/parse.c b/py/parse.c index a7b73a56734c..1381f1293d01 100644 --- a/py/parse.c +++ b/py/parse.c @@ -1,9 +1,6 @@ -#include -#include +#include #include #include -#include -#include #include #include "misc.h" diff --git a/py/parsenum.c b/py/parsenum.c index 8e290da338c7..c9cef5fcd839 100644 --- a/py/parsenum.c +++ b/py/parsenum.c @@ -1,3 +1,4 @@ +#include #include #include "misc.h" diff --git a/py/runtime.c b/py/runtime.c index bd6f2289deb4..9c8ba636c03b 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -2,8 +2,6 @@ // mp_xxx functions are safer and can be called by anyone // note that rt_assign_xxx are called only from emit*, and maybe we can rename them to reflect this -#include -#include #include #include #include diff --git a/py/scope.c b/py/scope.c index fc12fb5da086..cc4be7c85dbe 100644 --- a/py/scope.c +++ b/py/scope.c @@ -1,6 +1,6 @@ +#include #include #include -#include #include #include "misc.h" diff --git a/py/sequence.c b/py/sequence.c index 1723bb416c17..184c34e0b89c 100644 --- a/py/sequence.c +++ b/py/sequence.c @@ -1,7 +1,5 @@ -#include -#include +#include #include -#include #include "nlr.h" #include "misc.h" diff --git a/py/showbc.c b/py/showbc.c index 609048e8f603..bc81086c7dbd 100644 --- a/py/showbc.c +++ b/py/showbc.c @@ -1,7 +1,4 @@ -#include -#include #include -#include #include #include "misc.h" diff --git a/py/stream.c b/py/stream.c index 59877d72424e..7c97ee10c371 100644 --- a/py/stream.c +++ b/py/stream.c @@ -1,4 +1,4 @@ -#include +#include #include "nlr.h" #include "misc.h" diff --git a/py/vm.c b/py/vm.c index 77762a13af08..7b78b5fefb28 100644 --- a/py/vm.c +++ b/py/vm.c @@ -1,7 +1,4 @@ -#include -#include #include -#include #include #include "nlr.h" diff --git a/py/vstr.c b/py/vstr.c index c518fa7048a2..032acc61bcec 100644 --- a/py/vstr.c +++ b/py/vstr.c @@ -1,3 +1,4 @@ +#include #include #include #include