mirror of
https://github.com/micropython/micropython.git
synced 2025-09-01 23:40:34 +02:00
unix: Workaround MP_OBJ_NEW_SMALL_INT() 64-bit issues.
This commit is contained in:
@@ -106,7 +106,7 @@ STATIC mp_obj_t fdfile_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const
|
||||
|
||||
int fd = open(fname, mode, 0644);
|
||||
if (fd == -1) {
|
||||
nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(errno)));
|
||||
nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT((machine_int_t)errno)));
|
||||
}
|
||||
return fdfile_new(fd);
|
||||
}
|
||||
|
Reference in New Issue
Block a user