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 /unix/file.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 'unix/file.c')
-rw-r--r-- | unix/file.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/unix/file.c b/unix/file.c index 258aa65d50..d711ace4f1 100644 --- a/unix/file.c +++ b/unix/file.c @@ -106,13 +106,13 @@ static mp_obj_t fdfile_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const } static const mp_method_t rawfile_type_methods[] = { - { "fileno", &fdfile_fileno_obj }, - { "read", &mp_stream_read_obj }, - { "readall", &mp_stream_readall_obj }, - { "readline", &mp_stream_unbuffered_readline_obj}, - { "write", &mp_stream_write_obj }, - { "close", &fdfile_close_obj }, - { NULL, NULL }, + { MP_QSTR_fileno, &fdfile_fileno_obj }, + { MP_QSTR_read, &mp_stream_read_obj }, + { MP_QSTR_readall, &mp_stream_readall_obj }, + { MP_QSTR_readline, &mp_stream_unbuffered_readline_obj}, + { MP_QSTR_write, &mp_stream_write_obj }, + { MP_QSTR_close, &fdfile_close_obj }, + { MP_QSTR_NULL, NULL }, }; static const mp_obj_type_t rawfile_type = { |