modos: stat(): Accept bytes argument.

This commit is contained in:
Paul Sokolovsky 2014-05-26 02:00:51 +03:00
parent d07bf029b7
commit 0405b2210d
1 changed files with 2 additions and 1 deletions

View File

@ -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);