From d621d21f70234789ba3223545cf533ad49091bb6 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Sun, 14 Jul 2024 06:45:15 +0000 Subject: [PATCH] Remove LPWSTR --- std/src/sys/pal/windows/c.rs | 2 -- std/src/sys/pal/windows/os.rs | 4 ++-- std/src/sys/pal/windows/stdio.rs | 12 ++++++------ 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/std/src/sys/pal/windows/c.rs b/std/src/sys/pal/windows/c.rs index da96858d68691..97fec6e59f0bd 100644 --- a/std/src/sys/pal/windows/c.rs +++ b/std/src/sys/pal/windows/c.rs @@ -28,8 +28,6 @@ pub type LPCVOID = *const c_void; pub type LPOVERLAPPED = *mut OVERLAPPED; pub type LPSECURITY_ATTRIBUTES = *mut SECURITY_ATTRIBUTES; pub type LPVOID = *mut c_void; -pub type LPWCH = *mut WCHAR; -pub type LPWSTR = *mut WCHAR; #[cfg(target_vendor = "win7")] pub type PSRWLOCK = *mut SRWLOCK; diff --git a/std/src/sys/pal/windows/os.rs b/std/src/sys/pal/windows/os.rs index 542fabcb66556..ed7911b99cbd1 100644 --- a/std/src/sys/pal/windows/os.rs +++ b/std/src/sys/pal/windows/os.rs @@ -81,7 +81,7 @@ pub fn error_string(mut errnum: i32) -> String { } pub struct Env { - base: c::LPWCH, + base: *mut c::WCHAR, iter: EnvIterator, } @@ -126,7 +126,7 @@ impl Iterator for Env { } #[derive(Clone)] -struct EnvIterator(c::LPWCH); +struct EnvIterator(*mut c::WCHAR); impl Iterator for EnvIterator { type Item = (OsString, OsString); diff --git a/std/src/sys/pal/windows/stdio.rs b/std/src/sys/pal/windows/stdio.rs index 10aeeac07ea2e..995be689b4671 100644 --- a/std/src/sys/pal/windows/stdio.rs +++ b/std/src/sys/pal/windows/stdio.rs @@ -182,12 +182,12 @@ fn write_valid_utf8_to_console(handle: c::HANDLE, utf8: &str) -> io::Result