py: Declare constant data as properly constant.
Otherwise some compilers (eg without optimisation) will put this read-only data in RAM instead of ROM.
This commit is contained in:
@@ -2649,7 +2649,7 @@ STATIC void compile_const_object(compiler_t *comp, mp_parse_node_struct_t *pns)
|
||||
}
|
||||
|
||||
typedef void (*compile_function_t)(compiler_t*, mp_parse_node_struct_t*);
|
||||
STATIC compile_function_t compile_function[] = {
|
||||
STATIC const compile_function_t compile_function[] = {
|
||||
#define nc NULL
|
||||
#define c(f) compile_##f
|
||||
#define DEF_RULE(rule, comp, kind, ...) comp,
|
||||
|
||||
Reference in New Issue
Block a user