瀏覽代碼

fix a compile bug when `PK_ENABLE_OS` is 0

blueloveTH 2 年之前
父節點
當前提交
c6b1c1015b
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. 1 3
      include/pocketpy/io.h
  2. 4 0
      src/pocketpy.cpp

+ 1 - 3
include/pocketpy/io.h

@@ -28,6 +28,4 @@ struct FileIO {
     static void _register(VM* vm, PyObject* mod, PyObject* type);
     static void _register(VM* vm, PyObject* mod, PyObject* type);
 };
 };
 
 
-#endif
-
-} // namespace pkpy
+#endif

+ 4 - 0
src/pocketpy.cpp

@@ -61,6 +61,10 @@ static dylib_entry_t load_dylib(const char* path){
 }
 }
 #endif
 #endif
 
 
+#else
+static dylib_entry_t load_dylib(const char* path){
+    return nullptr;
+}
 #endif
 #endif