py: Add MP_ROM_* macros and mp_rom_* types and use them.

This commit is contained in:
Damien George
2015-11-27 13:38:15 +00:00
parent 94fe6e523d
commit cbf7674025
46 changed files with 599 additions and 568 deletions

View File

@@ -417,9 +417,9 @@ STATIC void push_result_token(parser_t *parser) {
}
#if MICROPY_COMP_MODULE_CONST
STATIC const mp_map_elem_t mp_constants_table[] = {
STATIC const mp_rom_map_elem_t mp_constants_table[] = {
#if MICROPY_PY_UCTYPES
{ MP_OBJ_NEW_QSTR(MP_QSTR_uctypes), (mp_obj_t)&mp_module_uctypes },
{ MP_ROM_QSTR(MP_QSTR_uctypes), MP_ROM_PTR(&mp_module_uctypes) },
#endif
// Extra constants as defined by a port
MICROPY_PORT_CONSTANTS