@@ -4,12 +4,12 @@ label: 'Advanced config'
order: -2
---
-### Disable os-related features
+### Enable os-related features
-If you want to disable os-related features, you can do this before including `pocketpy.h`.
+If you want to enable os-related features, you can do this before including `pocketpy.h`.
```cpp
-#define PK_ENABLE_OS 0
+#define PK_ENABLE_OS 1
#include <pocketpy.h>
```
@@ -10,7 +10,7 @@
// Whether to compile os-related modules or not
#ifndef PK_ENABLE_OS // can be overrided by cmake
-#define PK_ENABLE_OS 1
+#define PK_ENABLE_OS 0
#endif
// Enable this if you are working with multi-threading (experimental)
@@ -2,6 +2,7 @@
namespace pkpy{
+#if PK_ENABLE_OS
static FILE* io_fopen(const char* name, const char* mode){
#if _MSC_VER
FILE* fp;
@@ -20,6 +21,7 @@ static size_t io_fread(void* buffer, size_t size, size_t count, FILE* fp){
return fread(buffer, size, count, fp);
}
+#endif
unsigned char* _default_import_handler(const char* name_p, int name_size, int* out_size){