Rename "c-stack-cdecl" ABI to "cdecl"

This commit is contained in:
Brian Anderson 2011-11-09 18:44:12 -08:00
parent 2b9b6e3521
commit b7ab28b50f
23 changed files with 25 additions and 27 deletions

View File

@ -112,7 +112,7 @@ const LLVMRealULE: uint = 13u;
const LLVMRealUNE: uint = 14u;
#[link_args = "-Lrustllvm"]
native "c-stack-cdecl" mod llvm = "rustllvm" {
native "cdecl" mod llvm = "rustllvm" {
type ModuleRef;
type ContextRef;

View File

@ -2008,8 +2008,6 @@ fn parse_item_native_mod(p: parser, attrs: [ast::attribute]) -> @ast::item {
let t = parse_str(p);
if str::eq(t, "rust-intrinsic") {
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") {

View File

@ -5,7 +5,7 @@ import comm;
import comm::{chan, port, send, recv};
import net;
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
type socket;
type server;
fn aio_init();

View File

@ -37,7 +37,7 @@ export recv;
export chan;
export port;
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
type void;
type rust_port;

View File

@ -8,7 +8,7 @@
* logging.
*/
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn debug_tydesc(td: *sys::type_desc);
fn debug_opaque<T>(td: *sys::type_desc, x: T);
fn debug_box<T>(td: *sys::type_desc, x: @T);

View File

@ -7,7 +7,7 @@ File system manipulation
import os::getcwd;
import os_fs;
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn rust_file_is_dir(path: str::sbuf) -> int;
}

View File

@ -1,6 +1,6 @@
import os::libc;
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn rust_get_stdin() -> os::libc::FILE;
fn rust_get_stdout() -> os::libc::FILE;
fn rust_get_stderr() -> os::libc::FILE;

View File

@ -6,7 +6,7 @@ TODO: Restructure and document
// FIXME Somehow merge stuff duplicated here and macosx_os.rs. Made difficult
// by https://github.com/graydon/rust/issues#issue/268
native "c-stack-cdecl" mod libc = "" {
native "cdecl" mod libc = "" {
fn read(fd: int, buf: *u8, count: uint) -> int;
fn write(fd: int, buf: *u8, count: uint) -> int;
fn fread(buf: *u8, size: uint, n: uint, f: libc::FILE) -> uint;
@ -86,7 +86,7 @@ fn waitpid(pid: int) -> int {
ret status;
}
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn rust_getcwd() -> str;
}

View File

@ -1,5 +1,5 @@
native "c-stack-cdecl" mod libc = "" {
native "cdecl" mod libc = "" {
fn read(fd: int, buf: *u8, count: uint) -> int;
fn write(fd: int, buf: *u8, count: uint) -> int;
fn fread(buf: *u8, size: uint, n: uint, f: libc::FILE) -> uint;
@ -79,7 +79,7 @@ fn waitpid(pid: int) -> int {
ret status;
}
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn rust_getcwd() -> str;
}

View File

@ -1,6 +1,6 @@
/* Module: math */
native "c-stack-cdecl" mod libc = "" {
native "cdecl" mod libc = "" {
fn sqrt(n: float) -> float;
fn sin(n: float) -> float;
fn asin(n: float) -> float;

View File

@ -1,4 +1,4 @@
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn rust_list_files(path: str) -> [str];
}

View File

@ -3,7 +3,7 @@ Module: rand
Random number generation
*/
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
type rctx;
fn rand_new() -> rctx;
fn rand_next(c: rctx) -> u32;

View File

@ -12,7 +12,7 @@ export program_output;
export spawn_process;
export waitpid;
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn rust_run_program(argv: *sbuf, in_fd: int, out_fd: int, err_fd: int) ->
int;
}

View File

@ -15,7 +15,7 @@ export eq, lteq, hash, is_empty, is_not_empty, is_whitespace, byte_len,
str_from_cstr, sbuf, as_buf, push_byte, utf8_char_width, safe_slice,
contains, iter_chars, loop_chars, loop_chars_sub;
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn rust_str_push(&s: str, ch: u8);
}

View File

@ -7,7 +7,7 @@ tag type_desc {
type_desc(@type_desc);
}
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
// Explicitly re-export native stuff we want to be made
// available outside this crate. Otherwise it's
// visible-in-crate, but not re-exported.

View File

@ -55,7 +55,7 @@ native "rust-intrinsic" mod rusti {
fn task_sleep(time_in_us: uint);
}
native "c-stack-cdecl" mod rustrt = "rustrt" {
native "cdecl" mod rustrt = "rustrt" {
// these can run on the C stack:
fn pin_task();
fn unpin_task();

View File

@ -26,7 +26,7 @@ export default_test_to_task;
export configure_test_task;
export joinable;
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn sched_threads() -> uint;
}

View File

@ -4,7 +4,7 @@ Module: time
// FIXME: Document what these functions do
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn get_time(&sec: u32, &usec: u32);
fn nano_time(&ns: u64);
}

View File

@ -148,7 +148,7 @@ mod icu {
// FIXME: should be -1, change when compiler supports negative
// constants
native "c-stack-cdecl" mod libicu = "icuuc" {
native "cdecl" mod libicu = "icuuc" {
fn u_hasBinaryProperty(c: UChar32, which: UProperty) -> UBool;
}
}

View File

@ -8,7 +8,7 @@ native "rust-intrinsic" mod rusti {
fn cast<T, U>(src: T) -> U;
}
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn leak<T>(-thing: T);
}

View File

@ -10,7 +10,7 @@ native "rust-intrinsic" mod rusti {
fn vec_len<T>(&&v: [mutable? T]) -> uint;
}
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn vec_reserve_shared<T>(t: *sys::type_desc,
&v: [mutable? T],
n: uint);

View File

@ -1,6 +1,6 @@
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn rust_list_files(path: str) -> [str];
}

View File

@ -1,5 +1,5 @@
native "c-stack-cdecl" mod libc = "" {
native "cdecl" mod libc = "" {
fn read(fd: int, buf: *u8, count: uint) -> int;
fn write(fd: int, buf: *u8, count: uint) -> int;
fn fread(buf: *u8, size: uint, n: uint, f: libc::FILE) -> uint;
@ -87,7 +87,7 @@ fn fclose(file: libc::FILE) {
libc::fclose(file)
}
native "c-stack-cdecl" mod rustrt {
native "cdecl" mod rustrt {
fn rust_process_wait(handle: int) -> int;
fn rust_getcwd() -> str;
}