File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,16 +161,16 @@ static int call_dupterm_read(void) {
161161
162162 nlr_buf_t nlr ;
163163 if (nlr_push (& nlr ) == 0 ) {
164- mp_obj_t read_m [3 ];
165- mp_load_method (MP_STATE_PORT (term_obj ), MP_QSTR_read , read_m );
166- read_m [2 ] = MP_OBJ_NEW_SMALL_INT ( 1 );
167- mp_obj_t res = mp_call_method_n_kw (1 , 0 , read_m );
164+ mp_obj_t readinto_m [3 ];
165+ mp_load_method (MP_STATE_PORT (term_obj ), MP_QSTR_readinto , readinto_m );
166+ readinto_m [2 ] = MP_STATE_PORT ( dupterm_arr_obj );
167+ mp_obj_t res = mp_call_method_n_kw (1 , 0 , readinto_m );
168168 if (res == mp_const_none ) {
169169 nlr_pop ();
170170 return -2 ;
171171 }
172172 mp_buffer_info_t bufinfo ;
173- mp_get_buffer_raise (res , & bufinfo , MP_BUFFER_READ );
173+ mp_get_buffer_raise (MP_STATE_PORT ( dupterm_arr_obj ) , & bufinfo , MP_BUFFER_READ );
174174 if (bufinfo .len == 0 ) {
175175 mp_uos_deactivate ("dupterm: EOF received, deactivating\n" , MP_OBJ_NULL );
176176 nlr_pop ();
You can’t perform that action at this time.
0 commit comments