kopia lustrzana https://github.com/micropython/micropython-lib
os: Don't use legacy getwd() libc function, not available in all libc's.
For example, not available in uclibc.pull/118/head^2
rodzic
38448bb955
commit
3de140698c
|
@ -1,5 +1,5 @@
|
|||
srctype = micropython-lib
|
||||
type = package
|
||||
version = 0.1.6
|
||||
version = 0.1.7
|
||||
author = Paul Sokolovsky
|
||||
depends = libc, errno, stat
|
||||
|
|
|
@ -18,7 +18,7 @@ mkdir_ = libc.func("i", "mkdir", "si")
|
|||
rename_ = libc.func("i", "rename", "ss")
|
||||
unlink_ = libc.func("i", "unlink", "s")
|
||||
rmdir_ = libc.func("i", "rmdir", "s")
|
||||
getwd_ = libc.func("s", "getwd", "s")
|
||||
getcwd_ = libc.func("s", "getcwd", "si")
|
||||
opendir_ = libc.func("P", "opendir", "s")
|
||||
readdir_ = libc.func("P", "readdir", "P")
|
||||
read_ = libc.func("i", "read", "ipi")
|
||||
|
@ -56,7 +56,7 @@ def raise_error():
|
|||
|
||||
def getcwd():
|
||||
buf = bytearray(512)
|
||||
return getwd_(buf)
|
||||
return getcwd_(buf, 512)
|
||||
|
||||
def mkdir(name, mode=0o777):
|
||||
e = mkdir_(name, mode)
|
||||
|
|
|
@ -6,7 +6,7 @@ from setuptools import setup
|
|||
|
||||
|
||||
setup(name='micropython-os',
|
||||
version='0.1.6',
|
||||
version='0.1.7',
|
||||
description='os module for MicroPython',
|
||||
long_description="This is a module reimplemented specifically for MicroPython standard library,\nwith efficient and lean design in mind. Note that this module is likely work\nin progress and likely supports just a subset of CPython's corresponding\nmodule. Please help with the development if you are interested in this\nmodule.",
|
||||
url='https://github.com/micropython/micropython/issues/405',
|
||||
|
|
Ładowanie…
Reference in New Issue