unix: Workaround MP_OBJ_NEW_SMALL_INT() 64-bit issues.

This commit is contained in:
Paul Sokolovsky
2014-04-22 00:16:46 +03:00
parent 5d3a830171
commit fa6f0506c1
3 changed files with 6 additions and 6 deletions

View File

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