File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -161,16 +161,16 @@ static int call_dupterm_read(void) {
161
161
162
162
nlr_buf_t nlr ;
163
163
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 );
168
168
if (res == mp_const_none ) {
169
169
nlr_pop ();
170
170
return -2 ;
171
171
}
172
172
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 );
174
174
if (bufinfo .len == 0 ) {
175
175
mp_uos_deactivate ("dupterm: EOF received, deactivating\n" , MP_OBJ_NULL );
176
176
nlr_pop ();
You can’t perform that action at this time.
0 commit comments