File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 259259#define MICROPY_LOADED_MODULES_DICT_SIZE (3)
260260#endif
261261
262+ // Initial size of __main__ dict
263+ #ifndef MICROPY_MAIN_DICT_SIZE
264+ #define MICROPY_MAIN_DICT_SIZE (1)
265+ #endif
266+
262267// Whether realloc/free should be passed allocated memory region size
263268// You must enable this if MICROPY_MEM_STATS is enabled
264269#ifndef MICROPY_MALLOC_USES_ALLOCATED_SIZE
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ void mp_init(void) {
105105 mp_obj_dict_init (& MP_STATE_VM (mp_loaded_modules_dict ), MICROPY_LOADED_MODULES_DICT_SIZE );
106106
107107 // initialise the __main__ module
108- mp_obj_dict_init (& MP_STATE_VM (dict_main ), 1 );
108+ mp_obj_dict_init (& MP_STATE_VM (dict_main ), MICROPY_MAIN_DICT_SIZE );
109109 mp_obj_dict_store (MP_OBJ_FROM_PTR (& MP_STATE_VM (dict_main )), MP_OBJ_NEW_QSTR (MP_QSTR___name__ ), MP_OBJ_NEW_QSTR (MP_QSTR___main__ ));
110110
111111 // locals = globals for outer module (see Objects/frameobject.c/PyFrame_New())
You can’t perform that action at this time.
0 commit comments