From 3cc17c69ffd64dca55fe613f6e931585d8893c0d Mon Sep 17 00:00:00 2001 From: stijn Date: Sat, 14 Feb 2015 18:44:31 +0100 Subject: py: Allow retrieving a function's __name__. Disabled by default. Enabled on unix and stmhal ports. --- py/bc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/bc.c') diff --git a/py/bc.c b/py/bc.c index 9498b4f182..3a8dc5e04f 100644 --- a/py/bc.c +++ b/py/bc.c @@ -62,7 +62,7 @@ STATIC NORETURN void fun_pos_args_mismatch(mp_obj_fun_bc_t *f, mp_uint_t expecte #elif MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_DETAILED nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError, "%s() takes %d positional arguments but %d were given", - mp_obj_fun_get_name(f), expected, given)); + qstr_str(mp_obj_fun_get_name(f)), expected, given)); #endif } -- cgit v1.2.3