From aef0586ee101aa1ba9f0cda38f23b0fdef3312a6 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 24 Feb 2017 17:47:02 +0100 Subject: py: Fix varg helpers by adding vlist variant of mp_obj_new_exception_msg --- py/obj.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'py/obj.h') diff --git a/py/obj.h b/py/obj.h index 55f235970..a794e0e95 100644 --- a/py/obj.h +++ b/py/obj.h @@ -26,6 +26,8 @@ #ifndef __MICROPY_INCLUDED_PY_OBJ_H__ #define __MICROPY_INCLUDED_PY_OBJ_H__ +#include + #include "py/mpconfig.h" #include "py/misc.h" #include "py/qstr.h" @@ -622,6 +624,7 @@ mp_obj_t mp_obj_new_exception_arg1(const mp_obj_type_t *exc_type, mp_obj_t arg); mp_obj_t mp_obj_new_exception_args(const mp_obj_type_t *exc_type, mp_uint_t n_args, const mp_obj_t *args); mp_obj_t mp_obj_new_exception_msg(const mp_obj_type_t *exc_type, const char *msg); mp_obj_t mp_obj_new_exception_msg_varg(const mp_obj_type_t *exc_type, 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_exception_msg_vlist(const mp_obj_type_t *exc_type, const char *fmt, va_list ap); // counts args by number of % symbols in fmt, excluding %%; can only handle void* sizes (ie no float/double!) mp_obj_t mp_obj_new_fun_bc(mp_obj_t def_args, mp_obj_t def_kw_args, const byte *code, const mp_uint_t *const_table); mp_obj_t mp_obj_new_fun_native(mp_obj_t def_args_in, mp_obj_t def_kw_args, const void *fun_data, const mp_uint_t *const_table); mp_obj_t mp_obj_new_fun_viper(mp_uint_t n_args, void *fun_data, mp_uint_t type_sig); -- cgit v1.2.3