From bb4c6f35c627ab3487cdd6bafb4588cc633cd6a4 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 31 Jul 2014 10:49:14 +0100 Subject: py: Make MP_OBJ_NEW_SMALL_INT cast arg to mp_int_t itself. Addresses issue #724. --- stmhal/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stmhal/file.c') 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 -- cgit v1.2.3