diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-26 20:15:40 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-26 20:15:40 +0000 |
commit | c12b2213c16ba8839981c362c4d5f133a84b374b (patch) | |
tree | 59e3de4cce2ab28a9d4f73ba70477be98fb3c353 /py/objstr.c | |
parent | 69b3ba0df38e276b55f8f76e7f5276723e6d3abe (diff) | |
download | micropython-c12b2213c16ba8839981c362c4d5f133a84b374b.tar.gz micropython-c12b2213c16ba8839981c362c4d5f133a84b374b.zip |
Change mp_method_t.name from const char * to qstr.
Addresses issue #377.
Diffstat (limited to 'py/objstr.c')
-rw-r--r-- | py/objstr.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/py/objstr.c b/py/objstr.c index 3ace7b051a..d8b391d446 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -694,18 +694,18 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(str_partition_obj, str_partition); STATIC MP_DEFINE_CONST_FUN_OBJ_2(str_rpartition_obj, str_rpartition); STATIC const mp_method_t str_type_methods[] = { - { "find", &str_find_obj }, - { "rfind", &str_rfind_obj }, - { "join", &str_join_obj }, - { "split", &str_split_obj }, - { "startswith", &str_startswith_obj }, - { "strip", &str_strip_obj }, - { "format", &str_format_obj }, - { "replace", &str_replace_obj }, - { "count", &str_count_obj }, - { "partition", &str_partition_obj }, - { "rpartition", &str_rpartition_obj }, - { NULL, NULL }, // end-of-list sentinel + { MP_QSTR_find, &str_find_obj }, + { MP_QSTR_rfind, &str_rfind_obj }, + { MP_QSTR_join, &str_join_obj }, + { MP_QSTR_split, &str_split_obj }, + { MP_QSTR_startswith, &str_startswith_obj }, + { MP_QSTR_strip, &str_strip_obj }, + { MP_QSTR_format, &str_format_obj }, + { MP_QSTR_replace, &str_replace_obj }, + { MP_QSTR_count, &str_count_obj }, + { MP_QSTR_partition, &str_partition_obj }, + { MP_QSTR_rpartition, &str_rpartition_obj }, + { MP_QSTR_NULL, NULL }, // end-of-list sentinel }; const mp_obj_type_t str_type = { |