Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 725e9ee

Browse files
committed
Update generate Windows bindings
1 parent 06c072f commit 725e9ee

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

library/std/src/sys/pal/windows/c/windows_sys.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ extern "system" {
618618
extern "system" {
619619
pub fn WriteConsoleW(
620620
hconsoleoutput: HANDLE,
621-
lpbuffer: *const core::ffi::c_void,
621+
lpbuffer: PCWSTR,
622622
nnumberofcharstowrite: u32,
623623
lpnumberofcharswritten: *mut u32,
624624
lpreserved: *const core::ffi::c_void,

library/std/src/sys/pal/windows/stdio.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,7 @@ fn write_u16s(handle: c::HANDLE, data: &[u16]) -> io::Result<usize> {
232232
debug_assert!(data.len() < u32::MAX as usize);
233233
let mut written = 0;
234234
cvt(unsafe {
235-
c::WriteConsoleW(
236-
handle,
237-
data.as_ptr() as c::LPCVOID,
238-
data.len() as u32,
239-
&mut written,
240-
ptr::null_mut(),
241-
)
235+
c::WriteConsoleW(handle, data.as_ptr(), data.len() as u32, &mut written, ptr::null_mut())
242236
})?;
243237
Ok(written as usize)
244238
}

0 commit comments

Comments
 (0)