diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-08 18:11:23 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-08 18:11:23 +0000 |
commit | 6c73ca1e754aa5fb822999a0b46f01e216619ec6 (patch) | |
tree | 6fdd7b4205d2a4ef7056753ff067f78fb1197f41 /unix | |
parent | 199b9e04eb186320f5d94bdc3b852f2443e466e0 (diff) | |
download | micropython-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.c | 2 |
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; } |