kopia lustrzana https://github.com/micropython/micropython
extmod/vfs: Use MP_REGISTER_ROOT_POINTER().
This uses MP_REGISTER_ROOT_POINTER() to register vfs_cur and vfs_mount_table instead of using a conditional inside of mp_state_vm_t. Signed-off-by: David Lechner <david@pybricks.com>pull/8922/head
rodzic
d532c55e3b
commit
32e32bd761
|
@ -547,4 +547,7 @@ int mp_vfs_mount_and_chdir_protected(mp_obj_t bdev, mp_obj_t mount_point) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MP_REGISTER_ROOT_POINTER(struct _mp_vfs_mount_t *vfs_cur);
|
||||||
|
MP_REGISTER_ROOT_POINTER(struct _mp_vfs_mount_t *vfs_mount_table);
|
||||||
|
|
||||||
#endif // MICROPY_VFS
|
#endif // MICROPY_VFS
|
||||||
|
|
|
@ -198,11 +198,6 @@ typedef struct _mp_state_vm_t {
|
||||||
|
|
||||||
// root pointers for extmod
|
// root pointers for extmod
|
||||||
|
|
||||||
#if MICROPY_VFS
|
|
||||||
struct _mp_vfs_mount_t *vfs_cur;
|
|
||||||
struct _mp_vfs_mount_t *vfs_mount_table;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if MICROPY_PY_BLUETOOTH
|
#if MICROPY_PY_BLUETOOTH
|
||||||
mp_obj_t bluetooth;
|
mp_obj_t bluetooth;
|
||||||
#endif
|
#endif
|
||||||
|
|
Ładowanie…
Reference in New Issue