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.
pull/5606/head
odewdney 2020-02-02 14:18:38 +00:00 zatwierdzone przez Damien George
rodzic 0645478475
commit b51a2c266a
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -29,8 +29,8 @@
#include "py/obj.h"
typedef enum {
PYEXEC_MODE_RAW_REPL,
PYEXEC_MODE_FRIENDLY_REPL,
PYEXEC_MODE_RAW_REPL,
} pyexec_mode_kind_t;
extern pyexec_mode_kind_t pyexec_mode_kind;