mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
py: Put mp_sys_path, mp_sys_argv and gc_collected in mp_state_ctx_t.
Without mp_sys_path and mp_sys_argv in the root pointer section of the state, their memory was being incorrectly collected by GC.
This commit is contained in:
@@ -39,7 +39,7 @@ extern uint gc_collected;
|
||||
STATIC mp_obj_t py_gc_collect(void) {
|
||||
gc_collect();
|
||||
#if MICROPY_PY_GC_COLLECT_RETVAL
|
||||
return MP_OBJ_NEW_SMALL_INT(gc_collected);
|
||||
return MP_OBJ_NEW_SMALL_INT(MP_STATE_MEM(gc_collected));
|
||||
#else
|
||||
return mp_const_none;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user