about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorPeter Atashian <retep998@gmail.com>2015-01-19 03:43:44 -0500
committerPeter Atashian <retep998@gmail.com>2015-01-19 03:43:44 -0500
commitb57662aed70fefd03cc50279644b736ddf4d72aa (patch)
tree09a8a891e8ca66dce36097faf1202243df47c7a3 /src
parentbd8a43c668ba93d29e9671c0c8dc6b67428bf492 (diff)
downloadrust-b57662aed70fefd03cc50279644b736ddf4d72aa.tar.gz
rust-b57662aed70fefd03cc50279644b736ddf4d72aa.zip
Fix HMODULE
Signed-off-by: Peter Atashian <retep998@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/liblibc/lib.rs3
-rw-r--r--src/libstd/sys/windows/os.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs
index d010615a24c..fa6468517e6 100644
--- a/src/liblibc/lib.rs
+++ b/src/liblibc/lib.rs
@@ -1541,7 +1541,8 @@ pub mod types {
                 pub type DWORDLONG = c_ulonglong;
 
                 pub type HANDLE = LPVOID;
-                pub type HMODULE = c_uint;
+                pub type HINSTANCE = HANDLE;
+                pub type HMODULE = HINSTANCE;
 
                 pub type LONG = c_long;
                 pub type PLONG = *mut c_long;
diff --git a/src/libstd/sys/windows/os.rs b/src/libstd/sys/windows/os.rs
index 4540068133b..e9490dc95c9 100644
--- a/src/libstd/sys/windows/os.rs
+++ b/src/libstd/sys/windows/os.rs
@@ -281,7 +281,7 @@ pub fn join_paths<T: BytesContainer>(paths: &[T]) -> Result<Vec<u8>, &'static st
 pub fn load_self() -> Option<Vec<u8>> {
     unsafe {
         fill_utf16_buf_and_decode(|buf, sz| {
-            libc::GetModuleFileNameW(0u as libc::DWORD, buf, sz)
+            libc::GetModuleFileNameW(ptr::null_mut(), buf, sz)
         }).map(|s| s.to_string().into_bytes())
     }
 }