提交 3e57808a 编写于 作者: B Brian Anderson

std: Move raw to std::raw

Issue #1457
上级 4d10bdc5
......@@ -13,7 +13,7 @@
transmute_region, transmute_mut_region};
use stack::Stack;
use std::unstable::stack;
use std::unstable::raw;
use std::raw;
// FIXME #7761: Registers is boxed so that it is 16-byte aligned, for storing
// SSE regs. It would be marginally better not to do this. In C++ we
......
......@@ -16,7 +16,7 @@
use std::rt::task::Task;
use std::sync::deque;
use std::unstable::mutex::NativeMutex;
use std::unstable::raw;
use std::raw;
use TaskState;
use context::Context;
......
......@@ -26,7 +26,7 @@
use std::rt::task::{Task, BlockedTask, SendMessage};
use std::task::TaskOpts;
use std::unstable::mutex::NativeMutex;
use std::unstable::raw;
use std::raw;
use context::Context;
use coroutine::Coroutine;
......
......@@ -22,7 +22,7 @@
use std::os;
use std::run::{ProcessOptions, Process, ProcessOutput};
use std::str;
use std::unstable::raw;
use std::raw;
use extra::tempfile::TempDir;
use syntax::abi;
......
......@@ -79,7 +79,7 @@
use vec::{ImmutableVector, MutableVector};
use vec;
use rt::global_heap::malloc_raw;
use unstable::raw::Slice;
use raw::Slice;
/// The representation of a C String.
///
......
......@@ -113,7 +113,7 @@ pub unsafe fn copy_lifetime_vec<'a,S,T>(_ptr: &'a [S], ptr: &T) -> &'a T {
#[cfg(test)]
mod tests {
use cast::{bump_box_refcount, transmute};
use unstable::raw;
use raw;
#[test]
fn test_transmute_copy() {
......
......@@ -11,7 +11,7 @@
#[doc(hidden)];
use ptr;
use unstable::raw;
use raw;
static RC_IMMORTAL : uint = 0x77777777;
......
......@@ -198,6 +198,8 @@
pub mod unstable;
#[experimental]
pub mod intrinsics;
#[experimental]
pub mod raw;
/* For internal use, not exported */
......
......@@ -15,7 +15,7 @@
/// Returns the refcount of a shared box (as just before calling this)
#[inline]
pub fn refcount<T>(t: @T) -> uint {
use unstable::raw::Repr;
use raw::Repr;
unsafe { (*t.repr()).ref_count - 1 }
}
......
......@@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[allow(missing_doc)];
use cast;
/// The representation of a Rust managed box
......
......@@ -18,7 +18,7 @@
use intrinsics::{Disr, Opaque, TyDesc, TyVisitor};
use mem;
use unstable::raw;
use raw;
/**
* Trait for visitor that wishes to reflect on data. To use this, create a
......
......@@ -30,7 +30,7 @@
use to_str::ToStr;
use vec::OwnedVector;
use intrinsics::{Disr, Opaque, TyDesc, TyVisitor, get_tydesc, visit_tydesc};
use unstable::raw;
use raw;
macro_rules! try( ($me:expr, $e:expr) => (
match $e {
......
......@@ -11,7 +11,7 @@
use libc::{c_void, size_t, free, malloc, realloc};
use ptr::{RawPtr, mut_null};
use intrinsics::abort;
use unstable::raw;
use raw;
use mem::size_of;
#[inline]
......
......@@ -20,7 +20,7 @@
use rt::global_heap;
use rt::local::Local;
use rt::task::Task;
use unstable::raw;
use raw;
use vec::ImmutableVector;
use vec_ng::Vec;
......
......@@ -177,7 +177,7 @@ pub fn unwinding(&self) -> bool {
}
pub fn try(&mut self, f: ||) {
use unstable::raw::Closure;
use raw::Closure;
use libc::{c_void};
unsafe {
......
......@@ -104,7 +104,7 @@ fn main() {
use vec_ng::Vec;
use default::Default;
use to_bytes::{IterBytes, Cb};
use unstable::raw::Repr;
use raw::Repr;
/*
Section: Creating a string
......@@ -1386,7 +1386,7 @@ pub mod raw {
use str::{is_utf8, OwnedStr, StrSlice};
use vec;
use vec::{MutableVector, ImmutableVector, OwnedVector};
use unstable::raw::Slice;
use raw::Slice;
/// Create a Rust string from a *u8 buffer of the given length
pub unsafe fn from_buf_len(buf: *u8, len: uint) -> ~str {
......
......@@ -21,7 +21,6 @@
pub mod lang;
pub mod sync;
pub mod mutex;
pub mod raw;
pub mod stack;
/**
......
......@@ -122,7 +122,7 @@
use kinds::marker;
use uint;
use unstable::finally::try_finally;
use unstable::raw::{Repr, Slice, Vec};
use raw::{Repr, Slice, Vec};
/**
* Creates and initializes an owned vector.
......@@ -2488,7 +2488,7 @@ pub mod raw {
use ptr;
use ptr::RawPtr;
use vec::{with_capacity, MutableVector, OwnedVector};
use unstable::raw::Slice;
use raw::Slice;
/**
* Form a slice from a pointer and length (as a number of units,
......
......@@ -24,7 +24,7 @@
use ptr::RawPtr;
use ptr;
use rt::global_heap::{malloc_raw, realloc_raw};
use unstable::raw::Slice;
use raw::Slice;
use vec::{ImmutableVector, Items, MutItems, MutableVector, RevItems};
pub struct Vec<T> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册