summaryrefslogtreecommitdiffstatshomepage
path: root/py/objbool.c
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 /py/objbool.c
parent199b9e04eb186320f5d94bdc3b852f2443e466e0 (diff)
downloadmicropython-6c73ca1e754aa5fb822999a0b46f01e216619ec6.tar.gz
micropython-6c73ca1e754aa5fb822999a0b46f01e216619ec6.zip
py: add variable argument exception constructor function.
Addresses issue #104.
Diffstat (limited to 'py/objbool.c')
-rw-r--r--py/objbool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objbool.c b/py/objbool.c
index cfab7db068..da9a678063 100644
--- a/py/objbool.c
+++ b/py/objbool.c
@@ -27,7 +27,7 @@ static mp_obj_t bool_make_new(mp_obj_t type_in, int n_args, const mp_obj_t *args
switch (n_args) {
case 0: return mp_const_false;
case 1: if (rt_is_true(args[0])) { return mp_const_true; } else { return mp_const_false; }
- default: nlr_jump(mp_obj_new_exception_msg_1_arg(MP_QSTR_TypeError, "bool takes at most 1 argument, %d given", (void*)(machine_int_t)n_args));
+ default: nlr_jump(mp_obj_new_exception_msg_varg(MP_QSTR_TypeError, "bool takes at most 1 argument, %d given", n_args));
}
}