Skip to content

Commit d26a96d

Browse files
committed
Add "cdecl" as synonym for "c-stack-cdecl"
1 parent e963428 commit d26a96d

18 files changed

+29
-27
lines changed

src/comp/syntax/parse/parser.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,6 +2010,8 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item {
20102010
abi = ast::native_abi_rust_intrinsic;
20112011
} else if str::eq(t, "c-stack-cdecl") {
20122012
abi = ast::native_abi_cdecl;
2013+
} else if str::eq(t, "cdecl") {
2014+
abi = ast::native_abi_cdecl;
20132015
} else if str::eq(t, "c-stack-stdcall") {
20142016
abi = ast::native_abi_stdcall;
20152017
} else if str::eq(t, "stdcall") {

src/comp/syntax/print/pprust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ fn print_item(s: ps, &&item: @ast::item) {
405405
word_nbsp(s, "\"rust-intrinsic\"");
406406
}
407407
ast::native_abi_cdecl. {
408-
word_nbsp(s, "\"c-stack-cdecl\"");
408+
word_nbsp(s, "\"cdecl\"");
409409
}
410410
ast::native_abi_stdcall. {
411411
word_nbsp(s, "\"stdcall\"");

src/test/bench/shootout-nbody.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// based on:
22
// http://shootout.alioth.debian.org/u32/benchmark.php?test=nbody&lang=java
33

4-
native "c-stack-cdecl" mod llvm = "" {
4+
native "cdecl" mod llvm = "" {
55
fn sqrt(n: float) -> float;
66
}
77

src/test/compile-fail/native-unsafe-fn-called.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// -*- rust -*-
22
// error-pattern: safe function calls function marked unsafe
3-
native "c-stack-cdecl" mod test {
3+
native "cdecl" mod test {
44
unsafe fn free();
55
}
66

src/test/compile-fail/native-unsafe-fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// -*- rust -*-
22
// error-pattern: unsafe functions can only be called
33

4-
native "c-stack-cdecl" mod test {
4+
native "cdecl" mod test {
55
unsafe fn free();
66
}
77

src/test/run-pass/bind-native.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Can we bind native things?
33
*/
44

5-
native "c-stack-cdecl" mod rustrt {
5+
native "cdecl" mod rustrt {
66
fn pin_task();
77
}
88

src/test/run-pass/binops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ fn test_fn() {
117117
assert (h1 >= h2);
118118
}
119119

120-
native "c-stack-cdecl" mod native_mod = "" {
120+
native "cdecl" mod native_mod = "" {
121121
fn do_gc();
122122
fn unsupervise();
123123
}

src/test/run-pass/c-stack-as-value.rs

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

3-
native "c-stack-cdecl" mod rustrt {
3+
native "cdecl" mod rustrt {
44
fn unsupervise();
55
}
66

src/test/run-pass/c-stack-returning-int64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std;
22
import std::str;
33

4-
native "c-stack-cdecl" mod libc = "" {
4+
native "cdecl" mod libc = "" {
55
fn atol(x: str::sbuf) -> int;
66
fn atoll(x: str::sbuf) -> i64;
77
}

src/test/run-pass/conditional-compile.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ const b: bool = false;
44
const b: bool = true;
55

66
#[cfg(bogus)]
7-
native "c-stack-cdecl" mod rustrt {
7+
native "cdecl" mod rustrt {
88
// This symbol doesn't exist and would be a link error if this
99
// module was translated
1010
fn bogus();
1111
}
1212

13-
native "c-stack-cdecl" mod rustrt { }
13+
native "cdecl" mod rustrt { }
1414

1515
#[cfg(bogus)]
1616
type t = int;
@@ -79,7 +79,7 @@ fn test_in_fn_ctxt() {
7979
}
8080

8181
mod test_native_items {
82-
native "c-stack-cdecl" mod rustrt {
82+
native "cdecl" mod rustrt {
8383
#[cfg(bogus)]
8484
fn vec_from_buf_shared<T>(ptr: *T, count: uint) -> [T];
8585
fn vec_from_buf_shared<T>(ptr: *T, count: uint) -> [T];

src/test/run-pass/import-from-native.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ mod spam {
33
fn eggs() { }
44
}
55

6-
native "c-stack-cdecl" mod rustrt {
6+
native "cdecl" mod rustrt {
77
import spam::{ham, eggs};
88
export ham;
99
export eggs;

src/test/run-pass/import-glob-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ mod a1 {
2020
// | | |
2121
mod a2 {
2222
// | | |
23-
native "c-stack-cdecl" mod b1 = "" {
23+
native "cdecl" mod b1 = "" {
2424
// | | |
2525
import a1::b2::*;
2626
// | <-/ -/

src/test/run-pass/invoke-external-native.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import std::sys;
44

55
// The purpose of this test is to check that we can
6-
// successfully (and safely) invoke external, c-stack-cdecl
6+
// successfully (and safely) invoke external, cdecl
77
// functions from outside the crate.
88

99
fn main() {

src/test/run-pass/item-attributes.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ mod test_single_attr_outer {
2929
mod mod1 { }
3030

3131
#[attr = "val"]
32-
native "c-stack-cdecl" mod rustrt { }
32+
native "cdecl" mod rustrt { }
3333

3434
#[attr = "val"]
3535
type t = obj { };
@@ -55,7 +55,7 @@ mod test_multi_attr_outer {
5555

5656
#[attr1 = "val"]
5757
#[attr2 = "val"]
58-
native "c-stack-cdecl" mod rustrt { }
58+
native "cdecl" mod rustrt { }
5959

6060
#[attr1 = "val"]
6161
#[attr2 = "val"]
@@ -83,7 +83,7 @@ mod test_stmt_single_attr_outer {
8383
}
8484
8585
#[attr = "val"]
86-
native "c-stack-cdecl" mod rustrt {
86+
native "cdecl" mod rustrt {
8787
}
8888
*/
8989

@@ -116,7 +116,7 @@ mod test_stmt_multi_attr_outer {
116116
117117
#[attr1 = "val"]
118118
#[attr2 = "val"]
119-
native "c-stack-cdecl" mod rustrt {
119+
native "cdecl" mod rustrt {
120120
}
121121
*/
122122

@@ -182,7 +182,7 @@ mod test_other_forms {
182182
}
183183

184184
mod test_native_items {
185-
native "c-stack-cdecl" mod rustrt {
185+
native "cdecl" mod rustrt {
186186
#[attr];
187187

188188
#[attr]

src/test/run-pass/native-mod.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ native mod libc = target_libc {
1010
fn free(int p) -> ();
1111
}
1212

13-
native "c-stack-cdecl" mod rustrt {
13+
native "cdecl" mod rustrt {
1414
fn str_buf(str s) -> int;
1515
}
1616

src/test/run-pass/native-opaque-type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
native "c-stack-cdecl" mod libc = "" {
3+
native "cdecl" mod libc = "" {
44
type file_handle;
55
}
66

src/test/run-pass/native.rc

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

4-
native "c-stack-cdecl" mod rustrt {
4+
native "cdecl" mod rustrt {
55
fn str_buf(str s) -> int;
66
}
77

src/test/run-pass/native2.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11

22

3-
native "c-stack-cdecl" mod rustrt {
3+
native "cdecl" mod rustrt {
44
fn unsupervise();
55
}
66

7-
native "c-stack-cdecl" mod bar = "" { }
7+
native "cdecl" mod bar = "" { }
88

9-
native "c-stack-cdecl" mod zed = "" { }
9+
native "cdecl" mod zed = "" { }
1010

11-
native "c-stack-cdecl" mod libc = "" {
11+
native "cdecl" mod libc = "" {
1212
fn write(fd: int, buf: *u8, count: uint) -> int;
1313
}
1414

15-
native "c-stack-cdecl" mod baz = "" { }
15+
native "cdecl" mod baz = "" { }
1616

1717
fn main(args: [str]) { }

0 commit comments

Comments
 (0)