summaryrefslogtreecommitdiffstatshomepage
path: root/unix/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/file.c')
-rw-r--r--unix/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/file.c b/unix/file.c
index 7bbe3bfd00..0d11de6332 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -50,7 +50,7 @@ static MP_DEFINE_CONST_FUN_OBJ_1(fdfile_close_obj, fdfile_close);
static mp_obj_t fdfile_fileno(mp_obj_t self_in) {
mp_obj_fdfile_t *self = self_in;
- return MP_OBJ_NEW_SMALL_INT(self->fd);
+ return MP_OBJ_NEW_SMALL_INT((machine_int_t)self->fd);
}
static MP_DEFINE_CONST_FUN_OBJ_1(fdfile_fileno_obj, fdfile_fileno);