diff options
author | Damien George <damien.p.george@gmail.com> | 2014-07-31 10:49:14 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-07-31 10:49:14 +0100 |
commit | bb4c6f35c627ab3487cdd6bafb4588cc633cd6a4 (patch) | |
tree | 6177f71ef43916008070e625f6eea0c7834f8c48 /stmhal/file.c | |
parent | fa1ecda3fdaecd89b86bb63930a6521c8f63fe90 (diff) |
py: Make MP_OBJ_NEW_SMALL_INT cast arg to mp_int_t itself.
Addresses issue #724.
Diffstat (limited to 'stmhal/file.c')
-rw-r--r-- | stmhal/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/file.c b/stmhal/file.c index db6d08e5e..7ce8ef43f 100644 --- a/stmhal/file.c +++ b/stmhal/file.c @@ -206,7 +206,7 @@ STATIC mp_obj_t file_obj_make_new(mp_obj_t type, uint n_args, uint n_kw, const m FRESULT res = f_open(&o->fp, fname, mode); if (res != FR_OK) { m_del_obj(pyb_file_obj_t, o); - nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT((mp_int_t)fresult_to_errno_table[res]))); + nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(fresult_to_errno_table[res]))); } // for 'a' mode, we must begin at the end of the file |