Skip to content

Commit 0405b22

Browse files
committed
modos: stat(): Accept bytes argument.
1 parent d07bf02 commit 0405b22

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

unix/modos.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444

4545
STATIC mp_obj_t mod_os_stat(mp_obj_t path_in) {
4646
struct stat sb;
47-
const char *path = mp_obj_str_get_str(path_in);
47+
uint len;
48+
const char *path = mp_obj_str_get_data(path_in, &len);
4849

4950
int res = stat(path, &sb);
5051
RAISE_ERRNO(res, errno);

0 commit comments

Comments
 (0)