Change mp_obj_type_t.name from const char * to qstr.
Ultimately all static strings should be qstr. This entry in the type
structure is only used for printing error messages (to tell the type of
the bad argument), and printing objects that don't supply a .print method.
diff --git a/py/objgenerator.c b/py/objgenerator.c
index dff4ade..4e7d3a1 100644
--- a/py/objgenerator.c
+++ b/py/objgenerator.c
@@ -39,7 +39,7 @@
const mp_obj_type_t gen_wrap_type = {
{ &mp_const_type },
- "generator",
+ .name = MP_QSTR_generator,
.call = gen_wrap_call,
};
@@ -121,7 +121,7 @@
const mp_obj_type_t gen_instance_type = {
{ &mp_const_type },
- "generator",
+ .name = MP_QSTR_generator,
.print = gen_instance_print,
.getiter = gen_instance_getiter,
.iternext = gen_instance_iternext,