mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
04804ad410
commit
aa3be3b63d
@ -5,14 +5,14 @@
|
|||||||
#include "pocketpy/common/sstream.h"
|
#include "pocketpy/common/sstream.h"
|
||||||
#include "pocketpy/interpreter/vm.h"
|
#include "pocketpy/interpreter/vm.h"
|
||||||
|
|
||||||
#if _WIN32
|
#if PY_SYS_PLATFORM == 0
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
|
|
||||||
int platform_chdir(const char* path) { return _chdir(path); }
|
int platform_chdir(const char* path) { return _chdir(path); }
|
||||||
|
|
||||||
bool platform_getcwd(char* buf, size_t size) { return _getcwd(buf, size) != NULL; }
|
bool platform_getcwd(char* buf, size_t size) { return _getcwd(buf, size) != NULL; }
|
||||||
|
|
||||||
#elif __linux__
|
#elif PY_SYS_PLATFORM == 3 || PY_SYS_PLATFORM == 5
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int platform_chdir(const char* path) { return chdir(path); }
|
int platform_chdir(const char* path) { return chdir(path); }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user