Skip to content

Commit a3dc1b1

Browse files
committed
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.
1 parent 6c82cfc commit a3dc1b1

File tree

149 files changed

+3
-226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+3
-226
lines changed

drivers/cc3000/src/ccspi.c

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

3535
#include <string.h>
3636

37-
#include "py/nlr.h"
38-
#include "py/obj.h"
3937
#include "py/runtime.h"
4038
#include "pin.h"
4139
#include "led.h"

extmod/machine_mem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
* THE SOFTWARE.
2525
*/
2626

27+
#include "py/runtime.h"
2728
#include "extmod/machine_mem.h"
28-
#include "py/nlr.h"
2929

3030
#if MICROPY_PY_MACHINE
3131

extmod/modbtree.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
#include <errno.h> // for declaration of global errno variable
3030
#include <fcntl.h>
3131

32-
#include "py/nlr.h"
3332
#include "py/runtime.h"
34-
#include "py/runtime0.h"
3533
#include "py/stream.h"
3634

3735
#if MICROPY_PY_BTREE

extmod/modframebuf.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
#include <stdio.h>
2828
#include <string.h>
2929

30-
#include "py/nlr.h"
31-
#include "py/obj.h"
3230
#include "py/runtime.h"
3331

3432
#if MICROPY_PY_FRAMEBUF

extmod/modlwip.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <string.h>
3030
#include <stdio.h>
3131

32-
#include "py/nlr.h"
3332
#include "py/objlist.h"
3433
#include "py/runtime.h"
3534
#include "py/stream.h"

extmod/modubinascii.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include <assert.h>
2929
#include <string.h>
3030

31-
#include "py/nlr.h"
3231
#include "py/runtime.h"
3332
#include "py/binary.h"
3433
#include "extmod/modubinascii.h"

extmod/moductypes.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include <string.h>
2929
#include <stdint.h>
3030

31-
#include "py/nlr.h"
3231
#include "py/runtime.h"
3332
#include "py/objtuple.h"
3433
#include "py/binary.h"

extmod/moduhashlib.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include <assert.h>
2828
#include <string.h>
2929

30-
#include "py/nlr.h"
3130
#include "py/runtime.h"
3231

3332
#if MICROPY_PY_UHASHLIB

extmod/moduheapq.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424
* THE SOFTWARE.
2525
*/
2626

27-
#include "py/nlr.h"
2827
#include "py/objlist.h"
29-
#include "py/runtime0.h"
3028
#include "py/runtime.h"
3129

3230
#if MICROPY_PY_UHEAPQ

extmod/modujson.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
#include <stdio.h>
2828

29-
#include "py/nlr.h"
3029
#include "py/objlist.h"
3130
#include "py/objstringio.h"
3231
#include "py/parsenum.h"

0 commit comments

Comments
 (0)