diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-11-14 00:24:22 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-11-14 00:24:22 +0300 |
commit | 59a1201da959ab01895361c0b5bb8bc1409f2b39 (patch) | |
tree | 7fc38be0c61c88d12dd665b67f42ac1c0b437065 /cc3200/mods | |
parent | 99e5badeb1e2e6aeffd3b3d56902d4257e168326 (diff) | |
download | micropython-59a1201da959ab01895361c0b5bb8bc1409f2b39.tar.gz micropython-59a1201da959ab01895361c0b5bb8bc1409f2b39.zip |
all: Remove readall() method, which is equivalent to read() w/o args.
Its addition was due to an early exploration on how to add CPython-like
stream interface. It's clear that it's not needed and just takes up
bytes in all ports.
Diffstat (limited to 'cc3200/mods')
-rw-r--r-- | cc3200/mods/modusocket.c | 3 | ||||
-rw-r--r-- | cc3200/mods/pybuart.c | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/cc3200/mods/modusocket.c b/cc3200/mods/modusocket.c index 81a4c2e198..44e7f7f425 100644 --- a/cc3200/mods/modusocket.c +++ b/cc3200/mods/modusocket.c @@ -434,7 +434,6 @@ STATIC const mp_map_elem_t socket_locals_dict_table[] = { // stream methods { MP_OBJ_NEW_QSTR(MP_QSTR_read), (mp_obj_t)&mp_stream_read_obj }, - { MP_OBJ_NEW_QSTR(MP_QSTR_readall), (mp_obj_t)&mp_stream_readall_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_readinto), (mp_obj_t)&mp_stream_readinto_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_readline), (mp_obj_t)&mp_stream_unbuffered_readline_obj}, { MP_OBJ_NEW_QSTR(MP_QSTR_write), (mp_obj_t)&mp_stream_write_obj }, @@ -446,7 +445,7 @@ STATIC mp_uint_t socket_read(mp_obj_t self_in, void *buf, mp_uint_t size, int *e mod_network_socket_obj_t *self = self_in; mp_int_t ret = wlan_socket_recv(self, buf, size, errcode); if (ret < 0) { - // we need to ignore the socket closed error here because a readall() or read() without params + // we need to ignore the socket closed error here because a read() without params // only returns when the socket is closed by the other end if (*errcode != SL_ESECCLOSED) { ret = MP_STREAM_ERROR; diff --git a/cc3200/mods/pybuart.c b/cc3200/mods/pybuart.c index 493522f835..f6b917ab8f 100644 --- a/cc3200/mods/pybuart.c +++ b/cc3200/mods/pybuart.c @@ -570,8 +570,6 @@ STATIC const mp_map_elem_t pyb_uart_locals_dict_table[] = { /// \method read([nbytes]) { MP_OBJ_NEW_QSTR(MP_QSTR_read), (mp_obj_t)&mp_stream_read_obj }, - /// \method readall() - { MP_OBJ_NEW_QSTR(MP_QSTR_readall), (mp_obj_t)&mp_stream_readall_obj }, /// \method readline() { MP_OBJ_NEW_QSTR(MP_QSTR_readline), (mp_obj_t)&mp_stream_unbuffered_readline_obj}, /// \method readinto(buf[, nbytes]) |