Can we bind native things?
*/
-native "rust" mod rustrt {
+native "cdecl" mod rustrt {
fn task_yield();
}
assert (h1 >= h2);
}
-native "rust" mod native_mod = "" {
+native "cdecl" mod native_mod = "" {
fn do_gc();
fn unsupervise();
}
--- /dev/null
+// xfail-test
+
+native "c-stack-cdecl" mod rustrt {
+ fn unsupervise();
+}
+
+fn main() {
+ let _foo = rustrt::unsupervise;
+}
const b: bool = true;
#[cfg(bogus)]
-native "rust" mod rustrt {
+native "c-stack-cdecl" mod rustrt {
// This symbol doesn't exist and would be a link error if this
// module was translated
fn bogus();
}
-native "rust" mod rustrt { }
+native "c-stack-cdecl" mod rustrt { }
#[cfg(bogus)]
type t = int;
}
mod test_native_items {
- native "rust" mod rustrt {
+ native "c-stack-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];
fn eggs() { }
}
-native "rust" mod rustrt {
+native "c-stack-cdecl" mod rustrt {
import spam::{ham, eggs};
export ham;
export eggs;
use std;
import std::task;
-native "rust" mod rustrt {
+native "cdecl" mod rustrt {
fn task_yield();
}
-fn yield_wrap(&&_i: ()) unsafe { rustrt::task_yield(); }
+fn yield_wrap() { rustrt::task_yield(); }
fn main() { task::spawn((), yield_wrap); }
mod mod1 { }
#[attr = "val"]
- native "rust" mod rustrt { }
+ native "c-stack-cdecl" mod rustrt { }
#[attr = "val"]
type t = obj { };
#[attr1 = "val"]
#[attr2 = "val"]
- native "rust" mod rustrt { }
+ native "c-stack-cdecl" mod rustrt { }
#[attr1 = "val"]
#[attr2 = "val"]
}
#[attr = "val"]
- native "rust" mod rustrt {
+ native "c-stack-cdecl" mod rustrt {
}
*/
#[attr1 = "val"]
#[attr2 = "val"]
- native "rust" mod rustrt {
+ native "c-stack-cdecl" mod rustrt {
}
*/
}
mod test_native_items {
- native "rust" mod rustrt {
+ native "c-stack-cdecl" mod rustrt {
#[attr];
#[attr]
fn free(int p) -> ();
}
-native "rust" mod rustrt {
+native "c-stack-cdecl" mod rustrt {
fn str_buf(str s) -> int;
}
// xfail-test
// -*- rust -*-
-native "rust" mod rustrt {
+native "c-stack-cdecl" mod rustrt {
fn str_buf(str s) -> int;
}
-native "rust" mod rustrt {
+native "c-stack-cdecl" mod rustrt {
fn unsupervise();
}
-native "rust" mod bar = "" { }
+native "c-stack-cdecl" mod bar = "" { }
native "cdecl" mod zed = "" { }