summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-02-10 21:46:47 +0000
committerDamien George <damien.p.george@gmail.com>2014-02-10 21:46:47 +0000
commitd46ca25757b9021809946bb7274376c410b699eb (patch)
tree0b263aae2500ec3c96730ac1a01c0f84fc532de4 /unix
parent8c2b333affea7445c457c5247df047947bed9b53 (diff)
downloadmicropython-d46ca25757b9021809946bb7274376c410b699eb.tar.gz
micropython-d46ca25757b9021809946bb7274376c410b699eb.zip
Fix some int casting that failed on 64 bit architecture.
Diffstat (limited to 'unix')
-rw-r--r--unix/file.c2
-rw-r--r--unix/socket.c2
2 files changed, 2 insertions, 2 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);
diff --git a/unix/socket.c b/unix/socket.c
index eb4ea1e043..4b160e0bc8 100644
--- a/unix/socket.c
+++ b/unix/socket.c
@@ -86,7 +86,7 @@ static MP_DEFINE_CONST_FUN_OBJ_1(socket_close_obj, socket_close);
static mp_obj_t socket_fileno(mp_obj_t self_in) {
mp_obj_socket_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(socket_fileno_obj, socket_fileno);