|
@ -136,8 +136,6 @@ mp_obj_t mp_builtin_open(uint n_args, const mp_obj_t *args) { |
|
|
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_open_obj, 1, 2, mp_builtin_open); |
|
|
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_open_obj, 1, 2, mp_builtin_open); |
|
|
|
|
|
|
|
|
void file_init() { |
|
|
void file_init() { |
|
|
rt_store_name(MP_QSTR_open, (mp_obj_t)&mp_builtin_open_obj); |
|
|
|
|
|
|
|
|
|
|
|
mp_obj_t m_sys = mp_obj_new_module(MP_QSTR_sys); |
|
|
mp_obj_t m_sys = mp_obj_new_module(MP_QSTR_sys); |
|
|
rt_store_attr(m_sys, MP_QSTR_stdin, fdfile_new(STDIN_FILENO)); |
|
|
rt_store_attr(m_sys, MP_QSTR_stdin, fdfile_new(STDIN_FILENO)); |
|
|
rt_store_attr(m_sys, MP_QSTR_stdout, fdfile_new(STDOUT_FILENO)); |
|
|
rt_store_attr(m_sys, MP_QSTR_stdout, fdfile_new(STDOUT_FILENO)); |
|
|