summaryrefslogtreecommitdiffstatshomepage
path: root/unix/modos.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-07-31 13:47:06 +0000
committerDamien George <damien.p.george@gmail.com>2014-07-31 13:47:06 +0000
commit8cc2018d47bc15a1b10295965fc0ccd27c0dcbba (patch)
tree5e8ba4bed5de1f1973203b9cff2c8aab78b419fc /unix/modos.c
parentc9aa58e6381018cca2513e3468363af0b5442d1f (diff)
parentbb4c6f35c627ab3487cdd6bafb4588cc633cd6a4 (diff)
downloadmicropython-8cc2018d47bc15a1b10295965fc0ccd27c0dcbba.tar.gz
micropython-8cc2018d47bc15a1b10295965fc0ccd27c0dcbba.zip
Merge branch 'master' of https://github.com/micropython/micropython
Diffstat (limited to 'unix/modos.c')
-rw-r--r--unix/modos.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/unix/modos.c b/unix/modos.c
index 7ff3fbbb89..5cd78a99fb 100644
--- a/unix/modos.c
+++ b/unix/modos.c
@@ -40,7 +40,7 @@
#define RAISE_ERRNO(err_flag, error_val) \
{ if (err_flag == -1) \
- { nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT((mp_int_t)error_val))); } }
+ { nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(error_val))); } }
STATIC mp_obj_t mod_os_stat(mp_obj_t path_in) {
struct stat sb;
@@ -51,12 +51,12 @@ STATIC mp_obj_t mod_os_stat(mp_obj_t path_in) {
RAISE_ERRNO(res, errno);
mp_obj_tuple_t *t = mp_obj_new_tuple(10, NULL);
- t->items[0] = MP_OBJ_NEW_SMALL_INT((mp_int_t)sb.st_mode);
- t->items[1] = MP_OBJ_NEW_SMALL_INT((mp_int_t)sb.st_ino);
- t->items[2] = MP_OBJ_NEW_SMALL_INT((mp_int_t)sb.st_dev);
- t->items[3] = MP_OBJ_NEW_SMALL_INT((mp_int_t)sb.st_nlink);
- t->items[4] = MP_OBJ_NEW_SMALL_INT((mp_int_t)sb.st_uid);
- t->items[5] = MP_OBJ_NEW_SMALL_INT((mp_int_t)sb.st_gid);
+ t->items[0] = MP_OBJ_NEW_SMALL_INT(sb.st_mode);
+ t->items[1] = MP_OBJ_NEW_SMALL_INT(sb.st_ino);
+ t->items[2] = MP_OBJ_NEW_SMALL_INT(sb.st_dev);
+ t->items[3] = MP_OBJ_NEW_SMALL_INT(sb.st_nlink);
+ t->items[4] = MP_OBJ_NEW_SMALL_INT(sb.st_uid);
+ t->items[5] = MP_OBJ_NEW_SMALL_INT(sb.st_gid);
t->items[6] = MP_OBJ_NEW_SMALL_INT(sb.st_size);
t->items[7] = MP_OBJ_NEW_SMALL_INT(sb.st_atime);
t->items[8] = MP_OBJ_NEW_SMALL_INT(sb.st_mtime);