Ver Fonte

fix a compile bug when `PK_ENABLE_OS` is 0

blueloveTH há 2 anos atrás
pai
commit
c6b1c1015b
2 ficheiros alterados com 5 adições e 3 exclusões
  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);
 };
 
-#endif
-
-} // namespace pkpy
+#endif

+ 4 - 0
src/pocketpy.cpp

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