parent
4f6285fbf9
commit
e900dba28a
@ -94,7 +94,7 @@
|
||||
use unstable::finally::Finally;
|
||||
use unstable::intrinsics;
|
||||
use ptr;
|
||||
use ptr::Ptr;
|
||||
use ptr::RawPtr;
|
||||
use task;
|
||||
use vec;
|
||||
use vec::OwnedVector;
|
||||
|
@ -43,7 +43,7 @@
|
||||
pub use path::Path;
|
||||
pub use path::PosixPath;
|
||||
pub use path::WindowsPath;
|
||||
pub use ptr::Ptr;
|
||||
pub use ptr::RawPtr;
|
||||
pub use ascii::{Ascii, AsciiCast, OwnedAsciiCast, AsciiStr};
|
||||
pub use str::{StrVector, StrSlice, OwnedStr, StrUtil};
|
||||
pub use from_str::{FromStr};
|
||||
|
@ -296,7 +296,7 @@ pub unsafe fn array_each<T>(arr: **T, cb: &fn(*T)) {
|
||||
}
|
||||
|
||||
#[allow(missing_doc)]
|
||||
pub trait Ptr<T> {
|
||||
pub trait RawPtr<T> {
|
||||
fn is_null(&const self) -> bool;
|
||||
fn is_not_null(&const self) -> bool;
|
||||
unsafe fn to_option(&const self) -> Option<&T>;
|
||||
@ -304,7 +304,7 @@ pub trait Ptr<T> {
|
||||
}
|
||||
|
||||
/// Extension methods for immutable pointers
|
||||
impl<T> Ptr<T> for *T {
|
||||
impl<T> RawPtr<T> for *T {
|
||||
/// Returns true if the pointer is equal to the null pointer.
|
||||
#[inline(always)]
|
||||
fn is_null(&const self) -> bool { is_null(*self) }
|
||||
@ -336,7 +336,7 @@ fn offset(&self, count: uint) -> *T { offset(*self, count) }
|
||||
}
|
||||
|
||||
/// Extension methods for mutable pointers
|
||||
impl<T> Ptr<T> for *mut T {
|
||||
impl<T> RawPtr<T> for *mut T {
|
||||
/// Returns true if the pointer is equal to the null pointer.
|
||||
#[inline(always)]
|
||||
fn is_null(&const self) -> bool { is_null(*self) }
|
||||
|
@ -56,7 +56,7 @@
|
||||
|
||||
#[doc(hidden)];
|
||||
|
||||
use ptr::Ptr;
|
||||
use ptr::RawPtr;
|
||||
|
||||
/// The global (exchange) heap.
|
||||
pub mod global_heap;
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
use container::Container;
|
||||
use ptr::Ptr;
|
||||
use ptr::RawPtr;
|
||||
use vec;
|
||||
use ops::Drop;
|
||||
use libc::{c_uint, uintptr_t};
|
||||
|
@ -38,7 +38,7 @@
|
||||
use option::*;
|
||||
use str::raw::from_c_str;
|
||||
use to_str::ToStr;
|
||||
use ptr::Ptr;
|
||||
use ptr::RawPtr;
|
||||
use libc;
|
||||
use vec;
|
||||
use ptr;
|
||||
|
@ -30,7 +30,7 @@
|
||||
use option::{None, Option, Some};
|
||||
use old_iter::{BaseIter, EqIter};
|
||||
use ptr;
|
||||
use ptr::Ptr;
|
||||
use ptr::RawPtr;
|
||||
use str;
|
||||
use to_str::ToStr;
|
||||
use uint;
|
||||
|
@ -26,7 +26,7 @@
|
||||
use option::{None, Option, Some};
|
||||
use ptr::to_unsafe_ptr;
|
||||
use ptr;
|
||||
use ptr::Ptr;
|
||||
use ptr::RawPtr;
|
||||
use sys;
|
||||
use uint;
|
||||
use unstable::intrinsics;
|
||||
|
Loading…
Reference in New Issue
Block a user