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:
@@ -23,7 +23,7 @@ void ellipsis_print(void (*print)(void *env, const char *fmt, ...), void *env, m
|
||||
|
||||
const mp_obj_type_t ellipsis_type = {
|
||||
{ &mp_const_type },
|
||||
"ellipsis",
|
||||
.name = MP_QSTR_Ellipsis,
|
||||
.print = ellipsis_print,
|
||||
};
|
||||
|
||||
@@ -50,7 +50,7 @@ void slice_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_o
|
||||
|
||||
const mp_obj_type_t slice_type = {
|
||||
{ &mp_const_type },
|
||||
"slice",
|
||||
.name = MP_QSTR_slice,
|
||||
.print = slice_print,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user