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/socket.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/socket.c')
-rw-r--r-- | unix/socket.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/unix/socket.c b/unix/socket.c index d720275192..85e59b2848 100644 --- a/unix/socket.c +++ b/unix/socket.c @@ -218,25 +218,25 @@ static mp_obj_t socket_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const } static const mp_method_t microsocket_type_methods[] = { - { "fileno", &socket_fileno_obj }, - { "makefile", &mp_identity_obj }, - { "read", &mp_stream_read_obj }, - { "readall", &mp_stream_readall_obj }, - { "readline", &mp_stream_unbuffered_readline_obj}, - { "write", &mp_stream_write_obj }, - { "connect", &socket_connect_obj }, - { "bind", &socket_bind_obj }, - { "listen", &socket_listen_obj }, - { "accept", &socket_accept_obj }, - { "recv", &socket_recv_obj }, - { "send", &socket_send_obj }, - { "setsockopt", &socket_setsockopt_obj }, - { "close", &socket_close_obj }, + { MP_QSTR_fileno, &socket_fileno_obj }, + { MP_QSTR_makefile, &mp_identity_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_connect, &socket_connect_obj }, + { MP_QSTR_bind, &socket_bind_obj }, + { MP_QSTR_listen, &socket_listen_obj }, + { MP_QSTR_accept, &socket_accept_obj }, + { MP_QSTR_recv, &socket_recv_obj }, + { MP_QSTR_send, &socket_send_obj }, + { MP_QSTR_setsockopt, &socket_setsockopt_obj }, + { MP_QSTR_close, &socket_close_obj }, #if MICROPY_SOCKET_EXTRA - { "recv", &mp_stream_read_obj }, - { "send", &mp_stream_write_obj }, + { MP_QSTR_recv, &mp_stream_read_obj }, + { MP_QSTR_send, &mp_stream_write_obj }, #endif - { NULL, NULL }, + { MP_QSTR_NULL, NULL }, }; static const mp_obj_type_t microsocket_type = { |