diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-10-18 22:44:07 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-10-18 22:44:07 +0300 |
commit | 1a55b6a787ee7a568550ac0510632965af61c9ee (patch) | |
tree | 61f49937226e3dfb945adecef74cc1eff3dfc57e /unix/file.c | |
parent | c92672d7f8fc410477a4e25789d15c1fd99b675b (diff) |
unix, stmhal: Implement file.readinto() method.
Also, usocket.readinto(). Known issue is that .readinto() should be available
only for binary files, but micropython uses single method table for both
binary and text files.
Diffstat (limited to 'unix/file.c')
-rw-r--r-- | unix/file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/unix/file.c b/unix/file.c index 26c5be9c1..bb7ed247f 100644 --- a/unix/file.c +++ b/unix/file.c @@ -177,6 +177,7 @@ STATIC const mp_map_elem_t rawfile_locals_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_fileno), (mp_obj_t)&fdfile_fileno_obj }, { 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_readlines), (mp_obj_t)&mp_stream_unbuffered_readlines_obj}, { MP_OBJ_NEW_QSTR(MP_QSTR_write), (mp_obj_t)&mp_stream_write_obj }, |