diff options
author | Damien George <damien.p.george@gmail.com> | 2014-02-15 11:34:50 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-02-15 11:34:50 +0000 |
commit | a71c83a1d1aeca1d81d7c673929f8e836dec131e (patch) | |
tree | 5c49441e19c3feffbc792eec7ecfbc3ca3036830 /py/objstr.c | |
parent | 8ac72b9d000ecc48a2d558bdb7c73c7f98d4be62 (diff) |
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.
Diffstat (limited to 'py/objstr.c')
-rw-r--r-- | py/objstr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/py/objstr.c b/py/objstr.c index 7089b54d1..6ccd23995 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -508,7 +508,7 @@ STATIC const mp_method_t str_type_methods[] = { const mp_obj_type_t str_type = { { &mp_const_type }, - "str", + .name = MP_QSTR_str, .print = str_print, .binary_op = str_binary_op, .getiter = mp_obj_new_str_iterator, @@ -518,7 +518,7 @@ const mp_obj_type_t str_type = { // Reuses most of methods from str const mp_obj_type_t bytes_type = { { &mp_const_type }, - "bytes", + .name = MP_QSTR_bytes, .print = str_print, .binary_op = str_binary_op, .getiter = mp_obj_new_bytes_iterator, @@ -668,7 +668,7 @@ STATIC mp_obj_t str_it_iternext(mp_obj_t self_in) { STATIC const mp_obj_type_t str_it_type = { { &mp_const_type }, - "str_iterator", + .name = MP_QSTR_iterator, .iternext = str_it_iternext, }; @@ -686,7 +686,7 @@ STATIC mp_obj_t bytes_it_iternext(mp_obj_t self_in) { STATIC const mp_obj_type_t bytes_it_type = { { &mp_const_type }, - "bytes_iterator", + .name = MP_QSTR_iterator, .iternext = bytes_it_iternext, }; |