mirror of
https://github.com/pocketpy/pocketpy
synced 2026-08-07 06:37:10 +08:00
Merge branch 'main' into sandbox
This commit is contained in:
commit
01620fcb90
@ -48,6 +48,7 @@ static bool os_chdir(int argc, py_Ref argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool os_getcwd(int argc, py_Ref argv) {
|
static bool os_getcwd(int argc, py_Ref argv) {
|
||||||
|
PY_CHECK_ARGC(0);
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
if(!platform_getcwd(buf, sizeof(buf))) return OSError("getcwd() failed");
|
if(!platform_getcwd(buf, sizeof(buf))) return OSError("getcwd() failed");
|
||||||
py_newstr(py_retval(), buf);
|
py_newstr(py_retval(), buf);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user