Skip to content

Commit e963428

Browse files
committed
Add "stdcall" as synonym for "c-stack-stdcall"
1 parent 1afc943 commit e963428

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

src/comp/syntax/parse/parser.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,6 +2012,8 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item {
20122012
abi = ast::native_abi_cdecl;
20132013
} else if str::eq(t, "c-stack-stdcall") {
20142014
abi = ast::native_abi_stdcall;
2015+
} else if str::eq(t, "stdcall") {
2016+
abi = ast::native_abi_stdcall;
20152017
} else {
20162018
p.fatal("unsupported abi: " + t);
20172019
}

src/comp/syntax/print/pprust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ fn print_item(s: ps, &&item: @ast::item) {
408408
word_nbsp(s, "\"c-stack-cdecl\"");
409409
}
410410
ast::native_abi_stdcall. {
411-
word_nbsp(s, "\"c-stack-stdcall\"");
411+
word_nbsp(s, "\"stdcall\"");
412412
}
413413
}
414414
word_nbsp(s, "mod");

src/test/run-pass/x86stdcall.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// xfail-test
33

44
#[cfg(target_os = "win32")]
5-
native "c-stack-stdcall" mod kernel32 {
5+
native "stdcall" mod kernel32 {
66
fn SetLastError(err: uint);
77
fn GetLastError() -> uint;
88
}

src/test/run-pass/x86stdcall2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type LPVOID = uint;
55
type BOOL = u8;
66

77
#[cfg(target_os = "win32")]
8-
native "c-stack-stdcall" mod kernel32 {
8+
native "stdcall" mod kernel32 {
99
fn GetProcessHeap() -> HANDLE;
1010
fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID;
1111
fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID) -> BOOL;

0 commit comments

Comments
 (0)