diff options
Diffstat (limited to 'py/objstr.c')
-rw-r--r-- | py/objstr.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/py/objstr.c b/py/objstr.c index 81fd952915..0621a8df75 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -258,13 +258,6 @@ mp_obj_t str_strip(int n_args, const mp_obj_t *args) { return mp_obj_new_str(qstr_from_str_take(stripped_str, stripped_len + 1)); } -void vstr_printf_wrapper(void *env, const char *fmt, ...) { - va_list args; - va_start(args, fmt); - vstr_vprintf(env, fmt, args); - va_end(args); -} - mp_obj_t str_format(int n_args, const mp_obj_t *args) { assert(MP_OBJ_IS_TYPE(args[0], &str_type)); mp_obj_str_t *self = args[0]; @@ -282,7 +275,7 @@ mp_obj_t str_format(int n_args, const mp_obj_t *args) { nlr_jump(mp_obj_new_exception_msg(MP_QSTR_IndexError, "tuple index out of range")); } // TODO: may be PRINT_REPR depending on formatting code - mp_obj_print_helper(vstr_printf_wrapper, vstr, args[arg_i], PRINT_STR); + mp_obj_print_helper((void (*)(void*, const char*, ...))vstr_printf, vstr, args[arg_i], PRINT_STR); arg_i++; } } else { |