summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-08 18:11:23 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-08 18:11:23 +0000
commit6c73ca1e754aa5fb822999a0b46f01e216619ec6 (patch)
tree6fdd7b4205d2a4ef7056753ff067f78fb1197f41 /unix
parent199b9e04eb186320f5d94bdc3b852f2443e466e0 (diff)
downloadmicropython-6c73ca1e754aa5fb822999a0b46f01e216619ec6.tar.gz
micropython-6c73ca1e754aa5fb822999a0b46f01e216619ec6.zip
py: add variable argument exception constructor function.
Addresses issue #104.
Diffstat (limited to 'unix')
-rw-r--r--unix/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/file.c b/unix/file.c
index b81111afdd..398aac0759 100644
--- a/unix/file.c
+++ b/unix/file.c
@@ -83,7 +83,7 @@ static mp_obj_t fdfile_make_new(mp_obj_t type_in, int n_args, const mp_obj_t *ar
o->fd = open(fname, mode, 0644);
if (o->fd == -1) {
- nlr_jump(mp_obj_new_exception_msg_1_arg(MP_QSTR_OSError, "[Errno %d]", (const char *)errno));
+ nlr_jump(mp_obj_new_exception_msg_1_arg(MP_QSTR_OSError, "[Errno %d]", (const char *)(machine_int_t)errno));
}
return o;
}