SummerGift 8 år sedan
förälder
incheckning
66a11bfb10
3 ändrade filer med 4 tillägg och 9 borttagningar
  1. 1 1
      port/mpy_main.c
  2. 2 7
      py/mpstate.h
  3. 1 1
      py/runtime.c

+ 1 - 1
port/mpy_main.c

@@ -99,7 +99,7 @@ void mpy_main(const char *filename) {
         pyexec_frozen_module("frozentest.py");
         #endif
     }
-    mp_deinit();    //如果跳出了上面的循环就要退出mp,释放相关的资源
+    mp_deinit();
 
     rtt_getchar_deinit();
 }

+ 2 - 7
py/mpstate.h

@@ -177,13 +177,8 @@ typedef struct _mp_state_vm_t {
     #endif
 
     #if MICROPY_VFS
-    struct _mp_vfs_mount_t *vfs_cur;           //当前文件系统的指针
-    struct _mp_vfs_mount_t *vfs_mount_table;   //这个是指向文件系统列表的指针
-    #endif
-
-    #if MICROPY_MODUOS_FILE
-    struct _mp_vfs_mount_t *vfs_cur;           //当前文件系统的指针
-    struct _mp_vfs_mount_t *vfs_mount_table;   //这个是指向文件系统列表的指针
+    struct _mp_vfs_mount_t *vfs_cur;
+    struct _mp_vfs_mount_t *vfs_mount_table;
     #endif
 
     //

+ 1 - 1
py/runtime.c

@@ -115,7 +115,7 @@ void mp_init(void) {
     #endif
 
     #if MICROPY_VFS
-    // initialise the VFS sub-system 在这里如果打开了VFS的选项,那么在虚拟机状态就添加当前vfs状态,我觉得也应该在这里去注册文件系统到vfs中
+    // initialise the VFS sub-system
     MP_STATE_VM(vfs_cur) = NULL;
     MP_STATE_VM(vfs_mount_table) = NULL;
     #endif