Skip to content

Commit

Permalink
Update generate Windows bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton committed Jun 24, 2024
1 parent 06c072f commit 725e9ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/windows/c/windows_sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ extern "system" {
extern "system" {
pub fn WriteConsoleW(
hconsoleoutput: HANDLE,
lpbuffer: *const core::ffi::c_void,
lpbuffer: PCWSTR,
nnumberofcharstowrite: u32,
lpnumberofcharswritten: *mut u32,
lpreserved: *const core::ffi::c_void,
Expand Down
8 changes: 1 addition & 7 deletions library/std/src/sys/pal/windows/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,7 @@ fn write_u16s(handle: c::HANDLE, data: &[u16]) -> io::Result<usize> {
debug_assert!(data.len() < u32::MAX as usize);
let mut written = 0;
cvt(unsafe {
c::WriteConsoleW(
handle,
data.as_ptr() as c::LPCVOID,
data.len() as u32,
&mut written,
ptr::null_mut(),
)
c::WriteConsoleW(handle, data.as_ptr(), data.len() as u32, &mut written, ptr::null_mut())
})?;
Ok(written as usize)
}
Expand Down

0 comments on commit 725e9ee

Please # to comment.