Eliminate a call to reader_current_data

Try to get off of these globals.
This commit is contained in:
ridiculousfish
2024-05-27 12:04:08 -07:00
committed by Peter Ammon
parent c297df38c7
commit dfd948fcb5
2 changed files with 11 additions and 3 deletions

View File

@@ -12,7 +12,7 @@
Key, Modifiers,
};
use crate::reader::{reader_current_data, reader_test_and_clear_interrupted};
use crate::threads::{iothread_port, iothread_service_main, MainThread};
use crate::threads::{iothread_port, MainThread};
use crate::universal_notifier::default_notifier;
use crate::wchar::{encode_byte_to_char, prelude::*};
use crate::wutil::encoding::{mbrtowc, mbstate_t, zero_mbstate};
@@ -595,7 +595,7 @@ fn readch(&mut self) -> CharEvent {
}
ReadbResult::IOPortNotified => {
iothread_service_main(reader_current_data().unwrap());
self.ioport_notified();
}
ReadbResult::Byte(read_byte) => {
@@ -1215,6 +1215,10 @@ fn select_interrupted(&mut self) {}
/// The default does nothing.
fn uvar_change_notified(&mut self) {}
/// Override point for when the ioport is ready.
/// The default does nothing.
fn ioport_notified(&mut self) {}
/// Reset the function status.
fn get_function_status(&self) -> bool {
self.get_input_data().function_status