mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
Add "stdcall" as synonym for "c-stack-stdcall"
This commit is contained in:
parent
1afc943c91
commit
e96342820d
@ -2012,6 +2012,8 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item {
|
|||||||
abi = ast::native_abi_cdecl;
|
abi = ast::native_abi_cdecl;
|
||||||
} else if str::eq(t, "c-stack-stdcall") {
|
} else if str::eq(t, "c-stack-stdcall") {
|
||||||
abi = ast::native_abi_stdcall;
|
abi = ast::native_abi_stdcall;
|
||||||
|
} else if str::eq(t, "stdcall") {
|
||||||
|
abi = ast::native_abi_stdcall;
|
||||||
} else {
|
} else {
|
||||||
p.fatal("unsupported abi: " + t);
|
p.fatal("unsupported abi: " + t);
|
||||||
}
|
}
|
||||||
|
@ -408,7 +408,7 @@ fn print_item(s: ps, &&item: @ast::item) {
|
|||||||
word_nbsp(s, "\"c-stack-cdecl\"");
|
word_nbsp(s, "\"c-stack-cdecl\"");
|
||||||
}
|
}
|
||||||
ast::native_abi_stdcall. {
|
ast::native_abi_stdcall. {
|
||||||
word_nbsp(s, "\"c-stack-stdcall\"");
|
word_nbsp(s, "\"stdcall\"");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
word_nbsp(s, "mod");
|
word_nbsp(s, "mod");
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// xfail-test
|
// xfail-test
|
||||||
|
|
||||||
#[cfg(target_os = "win32")]
|
#[cfg(target_os = "win32")]
|
||||||
native "c-stack-stdcall" mod kernel32 {
|
native "stdcall" mod kernel32 {
|
||||||
fn SetLastError(err: uint);
|
fn SetLastError(err: uint);
|
||||||
fn GetLastError() -> uint;
|
fn GetLastError() -> uint;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ type LPVOID = uint;
|
|||||||
type BOOL = u8;
|
type BOOL = u8;
|
||||||
|
|
||||||
#[cfg(target_os = "win32")]
|
#[cfg(target_os = "win32")]
|
||||||
native "c-stack-stdcall" mod kernel32 {
|
native "stdcall" mod kernel32 {
|
||||||
fn GetProcessHeap() -> HANDLE;
|
fn GetProcessHeap() -> HANDLE;
|
||||||
fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID;
|
fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID;
|
||||||
fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID) -> BOOL;
|
fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID) -> BOOL;
|
||||||
|
Loading…
Reference in New Issue
Block a user