mirror of
https://github.com/openai/codex.git
synced 2026-11-13 21:30:47 +00:00
fix compile issues
This commit is contained in:
@@ -45,12 +45,13 @@ impl ProcThreadAttributeList {
|
||||
|
||||
pub fn set_pseudoconsole(&mut self, hpc: isize) -> io::Result<()> {
|
||||
let list = self.as_mut_ptr();
|
||||
let mut hpc_value = hpc;
|
||||
let ok = unsafe {
|
||||
UpdateProcThreadAttribute(
|
||||
list,
|
||||
0,
|
||||
PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE,
|
||||
hpc as *mut _,
|
||||
(&mut hpc_value as *mut isize).cast(),
|
||||
std::mem::size_of::<isize>(),
|
||||
std::ptr::null_mut(),
|
||||
std::ptr::null_mut(),
|
||||
|
||||
@@ -355,9 +355,10 @@ fn start_runner_stdin_writer(
|
||||
stdin_open: bool,
|
||||
) -> tokio::task::JoinHandle<()> {
|
||||
tokio::task::spawn_blocking(move || {
|
||||
let mut previous_was_cr = false;
|
||||
while let Some(bytes) = writer_rx.blocking_recv() {
|
||||
let bytes = if normalize_newlines {
|
||||
normalize_windows_tty_input(&bytes)
|
||||
normalize_windows_tty_input(&bytes, &mut previous_was_cr)
|
||||
} else {
|
||||
bytes
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user