summaryrefslogtreecommitdiffstatshomepage
path: root/py/obj.h
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/obj.h
parent199b9e04eb186320f5d94bdc3b852f2443e466e0 (diff)
downloadmicropython-6c73ca1e754aa5fb822999a0b46f01e216619ec6.tar.gz
micropython-6c73ca1e754aa5fb822999a0b46f01e216619ec6.zip
py: add variable argument exception constructor function.
Addresses issue #104.
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/obj.h b/py/obj.h
index a3af7f556b..5eb9fee75a 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -191,6 +191,7 @@ mp_obj_t mp_obj_new_exception(qstr id);
mp_obj_t mp_obj_new_exception_msg(qstr id, const char *msg);
mp_obj_t mp_obj_new_exception_msg_1_arg(qstr id, const char *fmt, const char *a1);
mp_obj_t mp_obj_new_exception_msg_2_args(qstr id, const char *fmt, const char *a1, const char *a2);
+mp_obj_t mp_obj_new_exception_msg_varg(qstr id, const char *fmt, ...); // counts args by number of % symbols in fmt, excluding %%; can only handle void* sizes (ie no float/double!)
mp_obj_t mp_obj_new_range(int start, int stop, int step);
mp_obj_t mp_obj_new_range_iterator(int cur, int stop, int step);
mp_obj_t mp_obj_new_fun_bc(int n_args, uint n_state, const byte *code);