all: Remove inclusion of internal py header files.

Header files that are considered internal to the py core and should not
normally be included directly are:
    py/nlr.h - internal nlr configuration and declarations
    py/bc0.h - contains bytecode macro definitions
    py/runtime0.h - contains basic runtime enums

Instead, the top-level header files to include are one of:
    py/obj.h - includes runtime0.h and defines everything to use the
        mp_obj_t type
    py/runtime.h - includes mpstate.h and hence nlr.h, obj.h, runtime0.h,
        and defines everything to use the general runtime support functions

Additional, specific headers (eg py/objlist.h) can be included if needed.
This commit is contained in:
Damien George 2017-10-04 12:37:50 +11:00
parent 6c82cfc089
commit a3dc1b1957
149 changed files with 3 additions and 226 deletions

View File

@ -34,8 +34,6 @@
#include <string.h>
#include "py/nlr.h"
#include "py/obj.h"
#include "py/runtime.h"
#include "pin.h"
#include "led.h"

View File

@ -24,8 +24,8 @@
* THE SOFTWARE.
*/
#include "py/runtime.h"
#include "extmod/machine_mem.h"
#include "py/nlr.h"
#if MICROPY_PY_MACHINE

View File

@ -29,9 +29,7 @@
#include <errno.h> // for declaration of global errno variable
#include <fcntl.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/runtime0.h"
#include "py/stream.h"
#if MICROPY_PY_BTREE

View File

@ -27,8 +27,6 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/obj.h"
#include "py/runtime.h"
#if MICROPY_PY_FRAMEBUF

View File

@ -29,7 +29,6 @@
#include <string.h>
#include <stdio.h>
#include "py/nlr.h"
#include "py/objlist.h"
#include "py/runtime.h"
#include "py/stream.h"

View File

@ -28,7 +28,6 @@
#include <assert.h>
#include <string.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/binary.h"
#include "extmod/modubinascii.h"

View File

@ -28,7 +28,6 @@
#include <string.h>
#include <stdint.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/objtuple.h"
#include "py/binary.h"

View File

@ -27,7 +27,6 @@
#include <assert.h>
#include <string.h>
#include "py/nlr.h"
#include "py/runtime.h"
#if MICROPY_PY_UHASHLIB

View File

@ -24,9 +24,7 @@
* THE SOFTWARE.
*/
#include "py/nlr.h"
#include "py/objlist.h"
#include "py/runtime0.h"
#include "py/runtime.h"
#if MICROPY_PY_UHEAPQ

View File

@ -26,7 +26,6 @@
#include <stdio.h>
#include "py/nlr.h"
#include "py/objlist.h"
#include "py/objstringio.h"
#include "py/parsenum.h"

View File

@ -27,7 +27,6 @@
#include <assert.h>
#include <string.h>
//#include "py/nlr.h"
#include "py/runtime.h"
#if MICROPY_PY_URANDOM

View File

@ -28,7 +28,6 @@
#include <assert.h>
#include <string.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/binary.h"
#include "py/objstr.h"

View File

@ -27,7 +27,6 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/stream.h"

View File

@ -31,10 +31,8 @@
#include <string.h>
#include <errno.h> // needed because mp_is_nonblocking_error uses system error codes
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/stream.h"
#include "py/obj.h"
// mbedtls_time_t
#include "mbedtls/platform.h"

View File

@ -27,9 +27,7 @@
#include <string.h>
#include "py/nlr.h"
#include "py/objlist.h"
#include "py/runtime0.h"
#include "py/runtime.h"
#include "py/smallint.h"

View File

@ -27,7 +27,6 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/stream.h"
#include "py/mperrno.h"

View File

@ -28,8 +28,6 @@
#include <stdint.h>
#include <string.h>
#include "py/nlr.h"
#include "py/obj.h"
#include "py/runtime.h"
#include "py/stream.h"
#include "py/builtin.h"

View File

@ -28,8 +28,6 @@
#include <stdint.h>
#include <string.h>
#include "py/nlr.h"
#include "py/obj.h"
#include "py/runtime.h"
#include "py/stream.h"
#include "extmod/modwebsocket.h"

View File

@ -27,7 +27,6 @@
#include <string.h>
#include "py/mpconfig.h"
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/objtuple.h"
#include "py/objarray.h"

View File

@ -27,7 +27,6 @@
#include <stdint.h>
#include <string.h>
#include "py/runtime0.h"
#include "py/runtime.h"
#include "py/objstr.h"
#include "py/mperrno.h"

View File

@ -33,7 +33,6 @@
#endif
#include <string.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/mperrno.h"
#include "lib/oofatfs/ff.h"

View File

@ -29,7 +29,6 @@
#include <stdio.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/stream.h"
#include "py/mperrno.h"

View File

@ -28,7 +28,6 @@
#if MICROPY_VFS_FAT
#include <string.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "lib/oofatfs/ff.h"
#include "extmod/vfs_fat.h"

View File

@ -29,8 +29,6 @@
#include <stdio.h>
#include <string.h>
#include "py/obj.h"
#include "py/nlr.h"
#include "py/runtime.h"
#include "lib/netutils/netutils.h"

View File

@ -29,7 +29,6 @@
#include <stdint.h>
#include <string.h>
#include "py/nlr.h"
#include "py/compile.h"
#include "py/runtime.h"
#include "py/repl.h"

View File

@ -29,7 +29,6 @@
#include <stdlib.h>
#include <unistd.h>
#include "py/mpstate.h"
#include "py/compile.h"
#include "py/persistentcode.h"
#include "py/runtime.h"

View File

@ -2,7 +2,6 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/compile.h"
#include "py/runtime.h"
#include "py/repl.h"

View File

@ -27,8 +27,7 @@
#include <stdint.h>
#include <stdio.h>
#include "py/mpstate.h"
#include "py/obj.h"
#include "py/runtime.h"
#include "lib/timeutils/timeutils.h"
#include "lib/oofatfs/ff.h"
#include "extmod/vfs.h"

View File

@ -33,7 +33,6 @@
#include <string.h>
#include "py/mpstate.h"
#include "py/mphal.h"
#include "py/runtime.h"
#include "py/objstr.h"

View File

@ -28,7 +28,6 @@
#include <stdint.h>
#include <string.h>
#include "py/mpstate.h"
#include "mpexception.h"

View File

@ -27,7 +27,6 @@
#include <stdint.h>
#include "py/mpstate.h"
#include "py/runtime.h"
#include "py/mphal.h"
#include "irq.h"

View File

@ -25,9 +25,6 @@
* THE SOFTWARE.
*/
#include "py/mpstate.h"
#include "py/obj.h"
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/mperrno.h"
#include "py/mphal.h"

View File

@ -25,8 +25,6 @@
* THE SOFTWARE.
*/
#include "py/mpconfig.h"
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/binary.h"
#include "extmod/modubinascii.h"

View File

@ -30,7 +30,6 @@
#include "py/mpconfig.h"
#include MICROPY_HAL_H
#include "py/nlr.h"
#include "py/runtime.h"
#include "inc/hw_types.h"
#include "inc/hw_ints.h"

View File

@ -28,8 +28,6 @@
#include <stdint.h>
#include <string.h>
#include "py/mpstate.h"
#include "py/nlr.h"
#include "py/objtuple.h"
#include "py/objstr.h"
#include "py/runtime.h"

View File

@ -28,8 +28,6 @@
#include <stdio.h>
#include <string.h>
#include "py/mpconfig.h"
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/binary.h"
#include "py/gc.h"

View File

@ -28,7 +28,6 @@
#include <stdio.h>
#include <string.h>
#include "py/mpstate.h"
#include "py/runtime.h"
#include "py/mperrno.h"
#include "py/mphal.h"

View File

@ -29,11 +29,8 @@
#include <stdint.h>
#include <string.h>
#include "py/mpconfig.h"
#include "py/obj.h"
#include "py/runtime.h"
#include "py/gc.h"
#include "py/mpstate.h"
#include "inc/hw_types.h"
#include "inc/hw_gpio.h"
#include "inc/hw_ints.h"

View File

@ -27,7 +27,6 @@
#include <stdint.h>
#include <string.h>
#include "py/mpstate.h"
#include "py/runtime.h"
#include "py/mphal.h"
#include "inc/hw_types.h"

View File

@ -28,7 +28,6 @@
#include <stdint.h>
#include <string.h>
#include "py/mpstate.h"
#include "py/runtime.h"
#include "py/mperrno.h"
#include "bufhelper.h"

View File

@ -29,9 +29,6 @@
#include <stdio.h>
#include <string.h>
#include "py/mpconfig.h"
#include "py/obj.h"
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/gc.h"
#include "py/mperrno.h"

View File

@ -29,8 +29,6 @@
#include <stdio.h>
#include <string.h>
#include "py/mpconfig.h"
#include "py/obj.h"
#include "py/runtime.h"
#include "py/objlist.h"
#include "py/stream.h"
@ -48,7 +46,6 @@
#include "mpirq.h"
#include "pybsleep.h"
#include "mpexception.h"
#include "py/mpstate.h"
#include "osi.h"
#include "utils.h"
#include "pin.h"

View File

@ -26,8 +26,6 @@
#include <stdio.h>
#include "py/mpconfig.h"
#include "py/mpstate.h"
#include "py/runtime.h"
#include "py/gc.h"
#include "py/mpthread.h"

View File

@ -28,8 +28,6 @@
#include <stdio.h>
#include <stdint.h>
#include "py/mpconfig.h"
#include "py/mpstate.h"
#include "py/gc.h"
#include "py/mpthread.h"
#include "gccollect.h"

View File

@ -31,8 +31,6 @@
#include "esp_mphal.h"
#include "user_interface.h"
#include "ets_alt_task.h"
#include "py/obj.h"
#include "py/mpstate.h"
#include "py/runtime.h"
#include "extmod/misc.h"
#include "lib/utils/pyexec.h"

View File

@ -27,8 +27,6 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/obj.h"
#include "py/runtime.h"
#include "user_interface.h"

View File

@ -33,7 +33,6 @@
#include "user_interface.h"
#include "gpio.h"
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/gc.h"
#include "py/mphal.h"

View File

@ -29,7 +29,6 @@
#include "esppwm.h"
#include "py/nlr.h"
#include "py/runtime.h"
#include "modmachine.h"

View File

@ -27,8 +27,6 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/obj.h"
#include "py/runtime.h"
#include "lib/timeutils/timeutils.h"
#include "user_interface.h"

View File

@ -27,8 +27,6 @@
//#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/obj.h"
#include "py/runtime.h"
#include "user_interface.h"
#include "etshal.h"

View File

@ -27,9 +27,7 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/compile.h"
#include "py/runtime0.h"
#include "py/runtime.h"
#include "py/stackctrl.h"
#include "py/mperrno.h"

View File

@ -28,7 +28,6 @@
#include <stdint.h>
#include <string.h>
#include "py/nlr.h"
#include "py/objlist.h"
#include "py/runtime.h"
#include "py/mphal.h"

View File

@ -28,8 +28,6 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/obj.h"
#include "py/gc.h"
#include "py/runtime.h"
#include "py/mphal.h"

View File

@ -2,7 +2,6 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/compile.h"
#include "py/runtime.h"
#include "py/repl.h"

View File

@ -4,10 +4,8 @@
#include <string.h>
#include <malloc.h>
#include "py/nlr.h"
#include "py/obj.h"
#include "py/compile.h"
#include "py/runtime0.h"
#include "py/runtime.h"
#include "py/stackctrl.h"
#include "py/gc.h"

View File

@ -4,10 +4,8 @@
#include <string.h>
#include <malloc.h>
#include "py/nlr.h"
#include "py/obj.h"
#include "py/compile.h"
#include "py/runtime0.h"
#include "py/runtime.h"
#include "py/stackctrl.h"
#include "py/gc.h"

View File

@ -28,7 +28,6 @@
#include <string.h>
#include "py/mphal.h"
#include "py/nlr.h"
#include "py/runtime.h"
#include "pin.h"
#include "genhdr/pins.h"

View File

@ -27,7 +27,6 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/binary.h"
#include "py/mphal.h"

View File

@ -28,7 +28,6 @@
#include <string.h>
#include <stdarg.h>
#include "py/nlr.h"
#include "py/objtuple.h"
#include "py/runtime.h"
#include "py/gc.h"

View File

@ -27,7 +27,6 @@
#include <stdio.h>
#include <stdint.h>
#include "py/mpstate.h"
#include "py/obj.h"
#include "py/gc.h"
#include "py/mpthread.h"

View File

@ -27,7 +27,6 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/mphal.h"
#include "irq.h"

View File

@ -24,7 +24,6 @@
* THE SOFTWARE.
*/
#include "py/nlr.h"
#include "py/obj.h"
#include "py/mphal.h"
#include "irq.h"

View File

@ -28,7 +28,6 @@
#include <string.h>
#include "py/mphal.h"
#include "py/nlr.h"
#include "py/runtime.h"
#if MICROPY_HW_HAS_LCD

View File

@ -26,7 +26,6 @@
#include <stdio.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/mphal.h"
#include "timer.h"

View File

@ -26,8 +26,6 @@
#ifndef MICROPY_INCLUDED_STMHAL_MODMACHINE_H
#define MICROPY_INCLUDED_STMHAL_MODMACHINE_H
#include "py/mpstate.h"
#include "py/nlr.h"
#include "py/obj.h"
void machine_init(void);

View File

@ -28,7 +28,6 @@
#include <stdint.h>
#include <string.h>
#include "py/nlr.h"
#include "py/objlist.h"
#include "py/runtime.h"
#include "modnetwork.h"

View File

@ -30,7 +30,6 @@
// CC3000 defines its own ENOBUFS (different to standard one!)
#undef ENOBUFS
#include "py/nlr.h"
#include "py/objtuple.h"
#include "py/objlist.h"
#include "py/stream.h"

View File

@ -28,7 +28,6 @@
#include <stdint.h>
#include <string.h>
#include "py/nlr.h"
#include "py/objlist.h"
#include "py/runtime.h"
#include "py/mperrno.h"

View File

@ -27,8 +27,6 @@
#include <stdint.h>
#include <stdio.h>
#include "py/mpstate.h"
#include "py/nlr.h"
#include "py/obj.h"
#include "py/gc.h"
#include "py/builtin.h"

View File

@ -27,7 +27,6 @@
#include <stdint.h>
#include <string.h>
#include "py/mpstate.h"
#include "py/runtime.h"
#include "py/objtuple.h"
#include "py/objstr.h"

View File

@ -27,7 +27,6 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/objtuple.h"
#include "py/objlist.h"
#include "py/runtime.h"

View File

@ -1,6 +1,5 @@
#include <string.h>
#include "py/mpstate.h"
#include "py/runtime.h"
#include "py/mperrno.h"
#include "py/mphal.h"

View File

@ -26,8 +26,6 @@
#include <stdio.h>
#include "py/mpconfig.h"
#include "py/mpstate.h"
#include "py/gc.h"
#include "py/mpthread.h"
#include "gccollect.h"

View File

@ -26,7 +26,6 @@
#include <stdlib.h>
#include "py/mpstate.h"
#include "py/runtime.h"
#include "lib/utils/interrupt_char.h"
#include "pendsv.h"

View File

@ -28,7 +28,6 @@
#include <stdint.h>
#include <string.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/mphal.h"
#include "extmod/virtpin.h"

View File

@ -26,7 +26,6 @@
#include <string.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/mphal.h"
#include "lib/oofatfs/ff.h"

View File

@ -27,7 +27,6 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/mphal.h"
#include "extmod/machine_spi.h"

View File

@ -67,7 +67,6 @@
#include <stdio.h>
#include "py/mpstate.h"
#include "py/obj.h"
#include "py/mphal.h"
#include "stm32_it.h"

View File

@ -28,7 +28,6 @@
#include <string.h>
#include <stdarg.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/stream.h"
#include "py/mperrno.h"

View File

@ -2,7 +2,6 @@
#include "Arduino.h"
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/mphal.h"
#include "led.h"

View File

@ -1,7 +1,6 @@
#include <stdio.h>
#include <string.h>
#include "py/mpstate.h"
#include "py/runtime.h"
#include "py/mphal.h"
#include "usb.h"

View File

@ -29,7 +29,6 @@
#include <string.h>
#include <stddef.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/gc.h"
#include "py/mphal.h"

View File

@ -27,7 +27,6 @@
#include <stdio.h>
#include <string.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "bufhelper.h"
#include "uart.h"

View File

@ -31,7 +31,6 @@
#include <sys/stat.h>
#include <sys/types.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/stream.h"
#include "py/builtin.h"

View File

@ -37,8 +37,6 @@
#include <errno.h>
#include <signal.h>
#include "py/mpstate.h"
#include "py/nlr.h"
#include "py/compile.h"
#include "py/runtime.h"
#include "py/builtin.h"

View File

@ -32,7 +32,6 @@
#include <ffi.h>
#include <stdint.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/binary.h"
#include "py/mperrno.h"

View File

@ -30,8 +30,6 @@
#include <dlfcn.h>
#include <ctype.h>
#include "py/nlr.h"
#include "py/runtime0.h"
#include "py/runtime.h"
#include "py/binary.h"

View File

@ -34,7 +34,6 @@
#include <dirent.h>
#include "py/mpconfig.h"
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/objtuple.h"
#include "py/mphal.h"

View File

@ -38,7 +38,6 @@
#include <netdb.h>
#include <errno.h>
#include "py/nlr.h"
#include "py/objtuple.h"
#include "py/objstr.h"
#include "py/runtime.h"

View File

@ -28,7 +28,6 @@
#include <stdlib.h>
#include <errno.h>
#include "py/mpstate.h"
#include "py/runtime.h"
#include "py/mpthread.h"
#include "py/gc.h"

View File

@ -29,7 +29,6 @@
#include <string.h>
#include <sys/time.h>
#include "py/mpstate.h"
#include "py/mphal.h"
#include "py/runtime.h"
#include "extmod/misc.h"

View File

@ -32,7 +32,6 @@
#include <zephyr.h>
#include <gpio.h>
#include "py/nlr.h"
#include "py/runtime.h"
#include "py/gc.h"
#include "py/mphal.h"

View File

@ -33,7 +33,6 @@
#include <net/net_context.h>
#endif
#include "py/nlr.h"
#include "py/compile.h"
#include "py/runtime.h"
#include "py/repl.h"

View File

@ -27,7 +27,6 @@
#include <stdlib.h>
#include <assert.h>
#include "py/nlr.h"
#include "py/runtime.h"
void mp_arg_check_num(size_t n_args, size_t n_kw, size_t n_args_min, size_t n_args_max, bool takes_kw) {

View File

@ -29,9 +29,7 @@
#include <string.h>
#include <assert.h>
#include "py/nlr.h"
#include "py/objfun.h"
#include "py/runtime0.h"
#include "py/runtime.h"
#include "py/bc0.h"
#include "py/bc.h"

View File

@ -27,7 +27,6 @@
#define MICROPY_INCLUDED_PY_BC_H
#include "py/runtime.h"
#include "py/obj.h"
#include "py/objfun.h"
// bytecode layout:

View File

@ -26,7 +26,6 @@
#include <stdint.h>
#include "py/nlr.h"
#include "py/objfun.h"
#include "py/compile.h"
#include "py/runtime.h"

View File

@ -29,7 +29,6 @@
#include <string.h>
#include <assert.h>
#include "py/nlr.h"
#include "py/compile.h"
#include "py/objmodule.h"
#include "py/persistentcode.h"

View File

@ -28,7 +28,6 @@
#include "py/lexer.h"
#include "py/scope.h"
#include "py/runtime0.h"
/* Notes on passes:
* We don't know exactly the opcodes in pass 1 because they depend on the

View File

@ -46,7 +46,6 @@
#include <string.h>
#include <assert.h>
#include "py/nlr.h"
#include "py/emit.h"
#include "py/bc.h"

Some files were not shown because too many files have changed in this diff Show More