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.
This commit is contained in:
Damien George
2014-02-15 11:34:50 +00:00
parent 8ac72b9d00
commit a71c83a1d1
47 changed files with 100 additions and 77 deletions

View File

@@ -175,7 +175,7 @@ STATIC const mp_method_t tuple_type_methods[] = {
const mp_obj_type_t tuple_type = {
{ &mp_const_type },
"tuple",
.name = MP_QSTR_tuple,
.print = tuple_print,
.make_new = tuple_make_new,
.unary_op = tuple_unary_op,
@@ -242,7 +242,7 @@ STATIC mp_obj_t tuple_it_iternext(mp_obj_t self_in) {
STATIC const mp_obj_type_t tuple_it_type = {
{ &mp_const_type },
"tuple_iterator",
.name = MP_QSTR_iterator,
.iternext = tuple_it_iternext,
};