Skip to content

Commit c34e7b9

Browse files
jimmodpgeorge
authored andcommitted
py/dynruntime.mk: Set MICROPY_ENABLE_DYNRUNTIME instead of per module.
So this setting could be used by other source files if needed.
1 parent 994c1dd commit c34e7b9

8 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎examples/natmod/btree/btree_c.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#define MICROPY_ENABLE_DYNRUNTIME (1)
21
#define MICROPY_PY_BTREE (1)
32

43
#include "py/dynruntime.h"

‎examples/natmod/framebuf/framebuf.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#define MICROPY_ENABLE_DYNRUNTIME (1)
21
#define MICROPY_PY_FRAMEBUF (1)
32

43
#include "py/dynruntime.h"

‎examples/natmod/uheapq/uheapq.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#define MICROPY_ENABLE_DYNRUNTIME (1)
21
#define MICROPY_PY_UHEAPQ (1)
32

43
#include "py/dynruntime.h"

‎examples/natmod/urandom/urandom.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#define MICROPY_ENABLE_DYNRUNTIME (1)
21
#define MICROPY_PY_URANDOM (1)
32
#define MICROPY_PY_URANDOM_EXTRA_FUNCS (1)
43

‎examples/natmod/ure/ure.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#define MICROPY_ENABLE_DYNRUNTIME (1)
21
#define MICROPY_STACK_CHECK (1)
32
#define MICROPY_PY_URE (1)
43
#define MICROPY_PY_URE_MATCH_GROUPS (1)

‎examples/natmod/uzlib/uzlib.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#define MICROPY_ENABLE_DYNRUNTIME (1)
21
#define MICROPY_PY_UZLIB (1)
32

43
#include "py/dynruntime.h"

‎py/dynruntime.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
#include "py/objstr.h"
3434
#include "py/objtype.h"
3535

36+
#if !MICROPY_ENABLE_DYNRUNTIME
37+
#error "dynruntime.h included in non-dynamic-module build."
38+
#endif
39+
3640
#undef MP_ROM_QSTR
3741
#undef MP_OBJ_QSTR_VALUE
3842
#undef MP_OBJ_NEW_QSTR

‎py/dynruntime.mk‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ CFLAGS += -std=c99
2727
CFLAGS += -Os
2828
CFLAGS += -Wall -Werror -DNDEBUG
2929
CFLAGS += -DNO_QSTR
30+
CFLAGS += -DMICROPY_ENABLE_DYNRUNTIME
3031
CFLAGS += -DMP_CONFIGFILE='<$(CONFIG_H)>'
3132
CFLAGS += -fpic -fno-common
3233
CFLAGS += -U _FORTIFY_SOURCE # prevent use of __*_chk libc functions

0 commit comments

Comments
 (0)