diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index b5b5f15b595..693625955f1 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -2012,6 +2012,8 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item { abi = ast::native_abi_cdecl; } else if str::eq(t, "c-stack-stdcall") { abi = ast::native_abi_stdcall; + } else if str::eq(t, "stdcall") { + abi = ast::native_abi_stdcall; } else { p.fatal("unsupported abi: " + t); } diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index 853ac67d93c..f10d4f47516 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -408,7 +408,7 @@ fn print_item(s: ps, &&item: @ast::item) { word_nbsp(s, "\"c-stack-cdecl\""); } ast::native_abi_stdcall. { - word_nbsp(s, "\"c-stack-stdcall\""); + word_nbsp(s, "\"stdcall\""); } } word_nbsp(s, "mod"); diff --git a/src/test/run-pass/x86stdcall.rs b/src/test/run-pass/x86stdcall.rs index 1a197aba518..d32042eaed1 100644 --- a/src/test/run-pass/x86stdcall.rs +++ b/src/test/run-pass/x86stdcall.rs @@ -2,7 +2,7 @@ // xfail-test #[cfg(target_os = "win32")] -native "c-stack-stdcall" mod kernel32 { +native "stdcall" mod kernel32 { fn SetLastError(err: uint); fn GetLastError() -> uint; } diff --git a/src/test/run-pass/x86stdcall2.rs b/src/test/run-pass/x86stdcall2.rs index 985d8d2218a..4edb8dc73e0 100644 --- a/src/test/run-pass/x86stdcall2.rs +++ b/src/test/run-pass/x86stdcall2.rs @@ -5,7 +5,7 @@ type LPVOID = uint; type BOOL = u8; #[cfg(target_os = "win32")] -native "c-stack-stdcall" mod kernel32 { +native "stdcall" mod kernel32 { fn GetProcessHeap() -> HANDLE; fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID; fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID) -> BOOL;