Support x86 stdcall convention

This allows rust to call the Win32 API
This commit is contained in:
Brian Anderson 2011-07-18 13:14:33 -07:00
parent 682875929e
commit c40d6265ce
7 changed files with 61 additions and 6 deletions

View file

@ -2004,6 +2004,8 @@ fn parse_item_native_mod(&parser p, &ast::attribute[] attrs) -> @ast::item {
abi = ast::native_abi_llvm;
} else if (str::eq(t, "rust-intrinsic")) {
abi = ast::native_abi_rust_intrinsic;
} else if (str::eq(t, "x86stdcall")) {
abi = ast::native_abi_x86stdcall;
} else { p.fatal("unsupported abi: " + t); fail; }
}
expect_word(p, "mod");