Add "cdecl" as synonym for "c-stack-cdecl"
This commit is contained in:
parent
e96342820d
commit
d26a96d2bb
@ -2010,6 +2010,8 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item {
|
||||
abi = ast::native_abi_rust_intrinsic;
|
||||
} else if str::eq(t, "c-stack-cdecl") {
|
||||
abi = ast::native_abi_cdecl;
|
||||
} else if str::eq(t, "cdecl") {
|
||||
abi = ast::native_abi_cdecl;
|
||||
} else if str::eq(t, "c-stack-stdcall") {
|
||||
abi = ast::native_abi_stdcall;
|
||||
} else if str::eq(t, "stdcall") {
|
||||
|
@ -405,7 +405,7 @@ fn print_item(s: ps, &&item: @ast::item) {
|
||||
word_nbsp(s, "\"rust-intrinsic\"");
|
||||
}
|
||||
ast::native_abi_cdecl. {
|
||||
word_nbsp(s, "\"c-stack-cdecl\"");
|
||||
word_nbsp(s, "\"cdecl\"");
|
||||
}
|
||||
ast::native_abi_stdcall. {
|
||||
word_nbsp(s, "\"stdcall\"");
|
||||
|
@ -1,7 +1,7 @@
|
||||
// based on:
|
||||
// http://shootout.alioth.debian.org/u32/benchmark.php?test=nbody&lang=java
|
||||
|
||||
native "c-stack-cdecl" mod llvm = "" {
|
||||
native "cdecl" mod llvm = "" {
|
||||
fn sqrt(n: float) -> float;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// -*- rust -*-
|
||||
// error-pattern: safe function calls function marked unsafe
|
||||
native "c-stack-cdecl" mod test {
|
||||
native "cdecl" mod test {
|
||||
unsafe fn free();
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// -*- rust -*-
|
||||
// error-pattern: unsafe functions can only be called
|
||||
|
||||
native "c-stack-cdecl" mod test {
|
||||
native "cdecl" mod test {
|
||||
unsafe fn free();
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
Can we bind native things?
|
||||
*/
|
||||
|
||||
native "c-stack-cdecl" mod rustrt {
|
||||
native "cdecl" mod rustrt {
|
||||
fn pin_task();
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ fn test_fn() {
|
||||
assert (h1 >= h2);
|
||||
}
|
||||
|
||||
native "c-stack-cdecl" mod native_mod = "" {
|
||||
native "cdecl" mod native_mod = "" {
|
||||
fn do_gc();
|
||||
fn unsupervise();
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// xfail-test
|
||||
|
||||
native "c-stack-cdecl" mod rustrt {
|
||||
native "cdecl" mod rustrt {
|
||||
fn unsupervise();
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std;
|
||||
import std::str;
|
||||
|
||||
native "c-stack-cdecl" mod libc = "" {
|
||||
native "cdecl" mod libc = "" {
|
||||
fn atol(x: str::sbuf) -> int;
|
||||
fn atoll(x: str::sbuf) -> i64;
|
||||
}
|
||||
|
@ -4,13 +4,13 @@ const b: bool = false;
|
||||
const b: bool = true;
|
||||
|
||||
#[cfg(bogus)]
|
||||
native "c-stack-cdecl" mod rustrt {
|
||||
native "cdecl" mod rustrt {
|
||||
// This symbol doesn't exist and would be a link error if this
|
||||
// module was translated
|
||||
fn bogus();
|
||||
}
|
||||
|
||||
native "c-stack-cdecl" mod rustrt { }
|
||||
native "cdecl" mod rustrt { }
|
||||
|
||||
#[cfg(bogus)]
|
||||
type t = int;
|
||||
@ -79,7 +79,7 @@ fn test_in_fn_ctxt() {
|
||||
}
|
||||
|
||||
mod test_native_items {
|
||||
native "c-stack-cdecl" mod rustrt {
|
||||
native "cdecl" mod rustrt {
|
||||
#[cfg(bogus)]
|
||||
fn vec_from_buf_shared<T>(ptr: *T, count: uint) -> [T];
|
||||
fn vec_from_buf_shared<T>(ptr: *T, count: uint) -> [T];
|
||||
|
@ -3,7 +3,7 @@ mod spam {
|
||||
fn eggs() { }
|
||||
}
|
||||
|
||||
native "c-stack-cdecl" mod rustrt {
|
||||
native "cdecl" mod rustrt {
|
||||
import spam::{ham, eggs};
|
||||
export ham;
|
||||
export eggs;
|
||||
|
@ -20,7 +20,7 @@ mod a1 {
|
||||
// | | |
|
||||
mod a2 {
|
||||
// | | |
|
||||
native "c-stack-cdecl" mod b1 = "" {
|
||||
native "cdecl" mod b1 = "" {
|
||||
// | | |
|
||||
import a1::b2::*;
|
||||
// | <-/ -/
|
||||
|
@ -3,7 +3,7 @@
|
||||
import std::sys;
|
||||
|
||||
// The purpose of this test is to check that we can
|
||||
// successfully (and safely) invoke external, c-stack-cdecl
|
||||
// successfully (and safely) invoke external, cdecl
|
||||
// functions from outside the crate.
|
||||
|
||||
fn main() {
|
||||
|
@ -29,7 +29,7 @@ mod test_single_attr_outer {
|
||||
mod mod1 { }
|
||||
|
||||
#[attr = "val"]
|
||||
native "c-stack-cdecl" mod rustrt { }
|
||||
native "cdecl" mod rustrt { }
|
||||
|
||||
#[attr = "val"]
|
||||
type t = obj { };
|
||||
@ -55,7 +55,7 @@ mod test_multi_attr_outer {
|
||||
|
||||
#[attr1 = "val"]
|
||||
#[attr2 = "val"]
|
||||
native "c-stack-cdecl" mod rustrt { }
|
||||
native "cdecl" mod rustrt { }
|
||||
|
||||
#[attr1 = "val"]
|
||||
#[attr2 = "val"]
|
||||
@ -83,7 +83,7 @@ mod test_stmt_single_attr_outer {
|
||||
}
|
||||
|
||||
#[attr = "val"]
|
||||
native "c-stack-cdecl" mod rustrt {
|
||||
native "cdecl" mod rustrt {
|
||||
}
|
||||
*/
|
||||
|
||||
@ -116,7 +116,7 @@ mod test_stmt_multi_attr_outer {
|
||||
|
||||
#[attr1 = "val"]
|
||||
#[attr2 = "val"]
|
||||
native "c-stack-cdecl" mod rustrt {
|
||||
native "cdecl" mod rustrt {
|
||||
}
|
||||
*/
|
||||
|
||||
@ -182,7 +182,7 @@ mod test_other_forms {
|
||||
}
|
||||
|
||||
mod test_native_items {
|
||||
native "c-stack-cdecl" mod rustrt {
|
||||
native "cdecl" mod rustrt {
|
||||
#[attr];
|
||||
|
||||
#[attr]
|
||||
|
@ -10,7 +10,7 @@ native mod libc = target_libc {
|
||||
fn free(int p) -> ();
|
||||
}
|
||||
|
||||
native "c-stack-cdecl" mod rustrt {
|
||||
native "cdecl" mod rustrt {
|
||||
fn str_buf(str s) -> int;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
native "c-stack-cdecl" mod libc = "" {
|
||||
native "cdecl" mod libc = "" {
|
||||
type file_handle;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// xfail-test
|
||||
// -*- rust -*-
|
||||
|
||||
native "c-stack-cdecl" mod rustrt {
|
||||
native "cdecl" mod rustrt {
|
||||
fn str_buf(str s) -> int;
|
||||
}
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
|
||||
|
||||
native "c-stack-cdecl" mod rustrt {
|
||||
native "cdecl" mod rustrt {
|
||||
fn unsupervise();
|
||||
}
|
||||
|
||||
native "c-stack-cdecl" mod bar = "" { }
|
||||
native "cdecl" mod bar = "" { }
|
||||
|
||||
native "c-stack-cdecl" mod zed = "" { }
|
||||
native "cdecl" mod zed = "" { }
|
||||
|
||||
native "c-stack-cdecl" mod libc = "" {
|
||||
native "cdecl" mod libc = "" {
|
||||
fn write(fd: int, buf: *u8, count: uint) -> int;
|
||||
}
|
||||
|
||||
native "c-stack-cdecl" mod baz = "" { }
|
||||
native "cdecl" mod baz = "" { }
|
||||
|
||||
fn main(args: [str]) { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user