diff options
Diffstat (limited to 'py')
| -rw-r--r-- | py/builtinhelp.c | 2 | ||||
| -rw-r--r-- | py/obj.c | 2 | ||||
| -rw-r--r-- | py/objdict.c | 2 | ||||
| -rw-r--r-- | py/objnamedtuple.c | 2 | ||||
| -rw-r--r-- | py/objtype.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/py/builtinhelp.c b/py/builtinhelp.c index a3fcc4dfb..c08c2e3b6 100644 --- a/py/builtinhelp.c +++ b/py/builtinhelp.c @@ -135,7 +135,7 @@ static void mp_help_print_obj(const mp_obj_t obj) { // try to print something sensible about the given object mp_print_str(MP_PYTHON_PRINTER, "object "); mp_obj_print(obj, PRINT_STR); - mp_printf(MP_PYTHON_PRINTER, " is of type %q\n", type->name); + mp_printf(MP_PYTHON_PRINTER, " is of type %q\n", (qstr)type->name); mp_map_t *map = NULL; if (type == &mp_type_module) { @@ -128,7 +128,7 @@ void mp_obj_print_helper(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t if (MP_OBJ_TYPE_HAS_SLOT(type, print)) { MP_OBJ_TYPE_GET_SLOT(type, print)((mp_print_t *)print, o_in, kind); } else { - mp_printf(print, "<%q>", type->name); + mp_printf(print, "<%q>", (qstr)type->name); } } diff --git a/py/objdict.c b/py/objdict.c index cf64fa955..451e87329 100644 --- a/py/objdict.c +++ b/py/objdict.c @@ -84,7 +84,7 @@ static void dict_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_ #endif } if (MICROPY_PY_COLLECTIONS_ORDEREDDICT && self->base.type != &mp_type_dict && kind != PRINT_JSON) { - mp_printf(print, "%q(", self->base.type->name); + mp_printf(print, "%q(", (qstr)self->base.type->name); } mp_print_str(print, "{"); size_t cur = 0; diff --git a/py/objnamedtuple.c b/py/objnamedtuple.c index f019604d5..e8447ee31 100644 --- a/py/objnamedtuple.c +++ b/py/objnamedtuple.c @@ -63,7 +63,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(namedtuple_asdict_obj, namedtuple_asdict); static void namedtuple_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind) { (void)kind; mp_obj_namedtuple_t *o = MP_OBJ_TO_PTR(o_in); - mp_printf(print, "%q", o->tuple.base.type->name); + mp_printf(print, "%q", (qstr)o->tuple.base.type->name); const qstr *fields = ((mp_obj_namedtuple_type_t *)o->tuple.base.type)->fields; mp_obj_attrtuple_print_helper(print, fields, &o->tuple); } diff --git a/py/objtype.c b/py/objtype.c index b9af10089..f2173c79a 100644 --- a/py/objtype.c +++ b/py/objtype.c @@ -977,7 +977,7 @@ static bool check_for_special_accessors(mp_obj_t key, mp_obj_t value) { static void type_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { (void)kind; mp_obj_type_t *self = MP_OBJ_TO_PTR(self_in); - mp_printf(print, "<class '%q'>", self->name); + mp_printf(print, "<class '%q'>", (qstr)self->name); } static mp_obj_t type_make_new(const mp_obj_type_t *type_in, size_t n_args, size_t n_kw, const mp_obj_t *args) { |
