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 /py/obj.h | |
parent | 199b9e04eb186320f5d94bdc3b852f2443e466e0 (diff) | |
download | micropython-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.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); |