diff options
Diffstat (limited to 'py/mpstate.h')
-rw-r--r-- | py/mpstate.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/py/mpstate.h b/py/mpstate.h index 10a5db8194..a2366df7f4 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -32,7 +32,7 @@ #include "py/misc.h" #include "py/nlr.h" #include "py/obj.h" -#include "py/objlist.h" // in case port needs mp_obj_list_t in root pointers +#include "py/objlist.h" #include "py/objexcept.h" // This file contains structures defining the state of the Micro Python @@ -66,6 +66,10 @@ typedef struct _mp_state_mem_t { uint16_t gc_auto_collect_enabled; mp_uint_t gc_last_free_atb_index; + + #if MICROPY_PY_GC_COLLECT_RETVAL + mp_uint_t gc_collected; + #endif } mp_state_mem_t; // This structure hold runtime and VM information. It includes a section @@ -106,6 +110,10 @@ typedef struct _mp_state_vm_t { // dictionary for the __main__ module mp_obj_dict_t dict_main; + // these two lists must be initialised per port, after the call to mp_init + mp_obj_list_t mp_sys_path_obj; + mp_obj_list_t mp_sys_argv_obj; + // dictionary for overridden builtins #if MICROPY_CAN_OVERRIDE_BUILTINS mp_obj_dict_t *mp_module_builtins_override_dict; |