From e6da0df6d100f726dcaf90e1552fa1628bb385c1 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 20 Jan 2014 23:00:26 +0200 Subject: [PATCH] mp_obj_get_type_str(): Handle MP_OBJ_QSTR. --- py/obj.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/py/obj.c b/py/obj.c index 7dd9cc0a24..86429d03d4 100644 --- a/py/obj.c +++ b/py/obj.c @@ -28,6 +28,8 @@ mp_obj_t mp_obj_get_type(mp_obj_t o_in) { const char *mp_obj_get_type_str(mp_obj_t o_in) { if (MP_OBJ_IS_SMALL_INT(o_in)) { return "int"; + } else if (MP_OBJ_IS_QSTR(o_in)) { + return "str"; } else { mp_obj_base_t *o = o_in; return o->type->name;