Skip to content

Commit 8418f2f

Browse files
committed
---
yaml --- r: 24230 b: refs/heads/master c: 3dd8768 h: refs/heads/master v: v3
1 parent 81d1dee commit 8418f2f

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: b41d5146cc4a80568a7a1e9bff2e6b89a91f9c11
2+
refs/heads/master: 3dd87689eeaebb809d6a79ad18e0c1f123f82826
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libcore/os.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,23 @@ pub fn fill_charp_buf(f: fn(*mut c_char, size_t) -> bool)
6666

6767
#[cfg(windows)]
6868
mod win32 {
69-
use dword = libc::DWORD;
69+
use libc::DWORD;
7070

71-
fn fill_utf16_buf_and_decode(f: fn(*mut u16, dword) -> dword)
71+
fn fill_utf16_buf_and_decode(f: fn(*mut u16, DWORD) -> DWORD)
7272
-> Option<~str> {
73-
use libc::dword;
74-
let mut n = tmpbuf_sz as dword;
73+
let mut n = tmpbuf_sz as DWORD;
7574
let mut res = None;
7675
let mut done = false;
7776
while !done {
7877
let buf = vec::to_mut(vec::from_elem(n as uint, 0u16));
7978
do vec::as_mut_buf(buf) |b, _sz| {
80-
let k : dword = f(b, tmpbuf_sz as dword);
81-
if k == (0 as dword) {
79+
let k : DWORD = f(b, tmpbuf_sz as DWORD);
80+
if k == (0 as DWORD) {
8281
done = true;
8382
} else if (k == n &&
8483
libc::GetLastError() ==
85-
libc::ERROR_INSUFFICIENT_BUFFER as dword) {
86-
n *= (2 as dword);
84+
libc::ERROR_INSUFFICIENT_BUFFER as DWORD) {
85+
n *= (2 as DWORD);
8786
} else {
8887
let sub = vec::slice(buf, 0u, k as uint);
8988
res = option::Some(str::from_utf16(sub));
@@ -394,7 +393,7 @@ pub fn self_exe_path() -> Option<Path> {
394393
fn load_self() -> Option<~str> {
395394
use win32::*;
396395
do fill_utf16_buf_and_decode() |buf, sz| {
397-
libc::GetModuleFileNameW(0u as libc::dword, buf, sz)
396+
libc::GetModuleFileNameW(0u as libc::DWORD, buf, sz)
398397
}
399398
}
400399

0 commit comments

Comments
 (0)