modos: stat(): Accept bytes argument.
This commit is contained in:
parent
d07bf029b7
commit
0405b2210d
@ -44,7 +44,8 @@
|
||||
|
||||
STATIC mp_obj_t mod_os_stat(mp_obj_t path_in) {
|
||||
struct stat sb;
|
||||
const char *path = mp_obj_str_get_str(path_in);
|
||||
uint len;
|
||||
const char *path = mp_obj_str_get_data(path_in, &len);
|
||||
|
||||
int res = stat(path, &sb);
|
||||
RAISE_ERRNO(res, errno);
|
||||
|
Loading…
x
Reference in New Issue
Block a user