3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,6 @@ pub type LPCVOID = *const c_void;
28
28
pub type LPOVERLAPPED = * mut OVERLAPPED ;
29
29
pub type LPSECURITY_ATTRIBUTES = * mut SECURITY_ATTRIBUTES ;
30
30
pub type LPVOID = * mut c_void ;
31
- pub type LPWCH = * mut WCHAR ;
32
- pub type LPWSTR = * mut WCHAR ;
33
31
34
32
#[ cfg( target_vendor = "win7" ) ]
35
33
pub type PSRWLOCK = * mut SRWLOCK ;
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ pub fn error_string(mut errnum: i32) -> String {
81
81
}
82
82
83
83
pub struct Env {
84
- base : c:: LPWCH ,
84
+ base : * mut c:: WCHAR ,
85
85
iter : EnvIterator ,
86
86
}
87
87
@@ -126,7 +126,7 @@ impl Iterator for Env {
126
126
}
127
127
128
128
#[ derive( Clone ) ]
129
- struct EnvIterator ( c:: LPWCH ) ;
129
+ struct EnvIterator ( * mut c:: WCHAR ) ;
130
130
131
131
impl Iterator for EnvIterator {
132
132
type Item = ( OsString , OsString ) ;
Original file line number Diff line number Diff line change @@ -182,12 +182,12 @@ fn write_valid_utf8_to_console(handle: c::HANDLE, utf8: &str) -> io::Result<usiz
182
182
// Note that this theoretically checks validity twice in the (most common) case
183
183
// where the underlying byte sequence is valid utf-8 (given the check in `write()`).
184
184
let result = c:: MultiByteToWideChar (
185
- c:: CP_UTF8 , // CodePage
186
- c:: MB_ERR_INVALID_CHARS , // dwFlags
187
- utf8. as_ptr ( ) , // lpMultiByteStr
188
- utf8. len ( ) as c:: c_int , // cbMultiByte
189
- utf16. as_mut_ptr ( ) as c:: LPWSTR , // lpWideCharStr
190
- utf16. len ( ) as c:: c_int , // cchWideChar
185
+ c:: CP_UTF8 , // CodePage
186
+ c:: MB_ERR_INVALID_CHARS , // dwFlags
187
+ utf8. as_ptr ( ) , // lpMultiByteStr
188
+ utf8. len ( ) as c:: c_int , // cbMultiByte
189
+ utf16. as_mut_ptr ( ) as * mut c:: WCHAR , // lpWideCharStr
190
+ utf16. len ( ) as c:: c_int , // cchWideChar
191
191
) ;
192
192
assert ! ( result != 0 , "Unexpected error in MultiByteToWideChar" ) ;
193
193
0 commit comments