lib/utils: Change default value of pyexec_mode_kind to 0 to put in bss.
By simply reordering the enums for pyexec_mode_kind_t it eliminates a data variable which costs ROM to initialise it. And the minimal build now has nothing in the data section. It seems the compiler is smart enough so that the generated code for if-logic which tests these enum values is unchanged.
This commit is contained in:
parent
0645478475
commit
b51a2c266a
@ -29,8 +29,8 @@
|
|||||||
#include "py/obj.h"
|
#include "py/obj.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PYEXEC_MODE_RAW_REPL,
|
|
||||||
PYEXEC_MODE_FRIENDLY_REPL,
|
PYEXEC_MODE_FRIENDLY_REPL,
|
||||||
|
PYEXEC_MODE_RAW_REPL,
|
||||||
} pyexec_mode_kind_t;
|
} pyexec_mode_kind_t;
|
||||||
|
|
||||||
extern pyexec_mode_kind_t pyexec_mode_kind;
|
extern pyexec_mode_kind_t pyexec_mode_kind;
|
||||||
|
Loading…
Reference in New Issue
Block a user