about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-03-19 21:57:49 -0700
committerbors <bors@rust-lang.org>2013-03-19 21:57:49 -0700
commitf3c879fdd8aad67cf4f6edd3aacb0189c284c920 (patch)
tree872abff783f535fce31af87b8bceeba0f10bf8dd /src/libcore
parent4cb9ca92962dbbe8ffd813c016e9d6f809dd285b (diff)
parentf8dab3a6c0adff63854d5e238961a771419d23b7 (diff)
downloadrust-f3c879fdd8aad67cf4f6edd3aacb0189c284c920.tar.gz
rust-f3c879fdd8aad67cf4f6edd3aacb0189c284c920.zip
auto merge of #5442 : pcwalton/rust/extern-block-restriction, r=pcwalton
r? @graydon
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/libc.rs9
-rw-r--r--src/libcore/rt/env.rs2
-rw-r--r--src/libcore/rt/sched.rs4
-rw-r--r--src/libcore/rt/stack.rs3
-rw-r--r--src/libcore/rt/thread.rs2
-rw-r--r--src/libcore/task/rt.rs2
6 files changed, 10 insertions, 12 deletions
diff --git a/src/libcore/libc.rs b/src/libcore/libc.rs
index e3646ef60f5..6a3ed22cea9 100644
--- a/src/libcore/libc.rs
+++ b/src/libcore/libc.rs
@@ -1221,9 +1221,8 @@ pub mod funcs {
         #[nolink]
         #[abi = "cdecl"]
         pub mod fcntl {
+            use libc::types::os::arch::c95::{c_int, c_char};
             pub extern {
-                use libc::types::os::arch::c95::{c_int, c_char};
-
                 #[link_name = "_open"]
                 unsafe fn open(path: *c_char, oflag: c_int, mode: c_int)
                             -> c_int;
@@ -1562,11 +1561,11 @@ pub mod funcs {
     #[cfg(target_os = "macos")]
     #[cfg(target_os = "freebsd")]
     pub mod bsd44 {
+        use libc::types::common::c95::{c_void};
+        use libc::types::os::arch::c95::{c_char, c_int, c_uint, size_t};
+
         #[abi = "cdecl"]
         pub extern {
-            use libc::types::common::c95::{c_void};
-            use libc::types::os::arch::c95::{c_char, c_int, c_uint, size_t};
-
             unsafe fn sysctl(name: *c_int, namelen: c_uint,
                       oldp: *mut c_void, oldlenp: *mut size_t,
                       newp: *c_void, newlen: size_t) -> c_int;
diff --git a/src/libcore/rt/env.rs b/src/libcore/rt/env.rs
index 008e31777b0..92e2ec51306 100644
--- a/src/libcore/rt/env.rs
+++ b/src/libcore/rt/env.rs
@@ -44,4 +44,4 @@ pub fn get() -> &Environment {
 
 extern {
     fn rust_get_rt_env() -> &Environment;
-}
\ No newline at end of file
+}
diff --git a/src/libcore/rt/sched.rs b/src/libcore/rt/sched.rs
index 69cbbdd2ad4..60dbc8b82da 100644
--- a/src/libcore/rt/sched.rs
+++ b/src/libcore/rt/sched.rs
@@ -70,7 +70,7 @@ enum CleanupJob {
 
 pub impl Scheduler {
 
-    static fn new(event_loop: ~EventLoopObject) -> Scheduler {
+    static pub fn new(event_loop: ~EventLoopObject) -> Scheduler {
         Scheduler {
             event_loop: event_loop,
             task_queue: WorkQueue::new(),
@@ -296,7 +296,7 @@ pub struct Task {
 }
 
 impl Task {
-    static fn new(stack_pool: &mut StackPool, start: ~fn()) -> Task {
+    static pub fn new(stack_pool: &mut StackPool, start: ~fn()) -> Task {
         // XXX: Putting main into a ~ so it's a thin pointer and can
         // be passed to the spawn function.  Another unfortunate
         // allocation
diff --git a/src/libcore/rt/stack.rs b/src/libcore/rt/stack.rs
index 02c47218ed8..b5e7d4f3aa2 100644
--- a/src/libcore/rt/stack.rs
+++ b/src/libcore/rt/stack.rs
@@ -37,8 +37,7 @@ pub impl StackSegment {
 pub struct StackPool(());
 
 impl StackPool {
-
-    static fn new() -> StackPool { StackPool(()) }
+    static pub fn new() -> StackPool { StackPool(()) }
 
     fn take_segment(&self, min_size: uint) -> StackSegment {
         StackSegment::new(min_size)
diff --git a/src/libcore/rt/thread.rs b/src/libcore/rt/thread.rs
index be1d86c9cf7..5dccf90096e 100644
--- a/src/libcore/rt/thread.rs
+++ b/src/libcore/rt/thread.rs
@@ -20,7 +20,7 @@ struct Thread {
 }
 
 impl Thread {
-    static fn start(main: ~fn()) -> Thread {
+    static pub fn start(main: ~fn()) -> Thread {
         fn substart(main: &fn()) -> *raw_thread {
             unsafe { rust_raw_thread_start(&main) }
         }
diff --git a/src/libcore/task/rt.rs b/src/libcore/task/rt.rs
index e95c6d90eee..760812252bc 100644
--- a/src/libcore/task/rt.rs
+++ b/src/libcore/task/rt.rs
@@ -30,7 +30,7 @@ pub type rust_task = libc::c_void;
 #[allow(non_camel_case_types)] // runtime type
 pub type rust_closure = libc::c_void;
 
-extern {
+pub extern {
     #[rust_stack]
     fn rust_task_yield(task: *rust_task) -> bool;