aboutsummaryrefslogtreecommitdiffstats
path: root/src/servo/dom/rcu.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2012-10-04 11:02:53 -0700
committerPatrick Walton <pcwalton@mimiga.net>2012-10-04 15:28:10 -0700
commit994c47d22b0a3603978d4b6dcb8ffed72e65ac9a (patch)
tree6939083c1dd3a6cf070a92214573c95cdd1f1833 /src/servo/dom/rcu.rs
parente105f3b5571f0cbfae3fc6a96938d4d039bb660d (diff)
downloadservo-994c47d22b0a3603978d4b6dcb8ffed72e65ac9a.tar.gz
servo-994c47d22b0a3603978d4b6dcb8ffed72e65ac9a.zip
Update for language changes; remove pipe protocols.
Diffstat (limited to 'src/servo/dom/rcu.rs')
-rw-r--r--src/servo/dom/rcu.rs17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/servo/dom/rcu.rs b/src/servo/dom/rcu.rs
index 17abd6bf099..5b4aef7b234 100644
--- a/src/servo/dom/rcu.rs
+++ b/src/servo/dom/rcu.rs
@@ -53,11 +53,6 @@ use core::libc::types::os::arch::c95::size_t;
use ptr::Ptr;
use vec::push;
-export Handle;
-export ReaderMethods;
-export WriterMethods;
-export Scope;
-
type ScopeData<T:Send,A> = {
mut layout_active: bool,
mut free_list: ~[Handle<T,A>],
@@ -76,13 +71,13 @@ fn ScopeResource<T:Send,A>(d : ScopeData<T,A>) -> ScopeResource<T,A> {
ScopeResource { d: d }
}
-type Scope<T:Send,A> = @ScopeResource<T,A>;
+pub type Scope<T:Send,A> = @ScopeResource<T,A>;
type HandleData<T:Send,A> = {mut read_ptr: *T,
mut write_ptr: *mut T,
mut read_aux: *A,
mut next_dirty: Handle<T,A>};
-enum Handle<T:Send,A> {
+pub enum Handle<T:Send,A> {
_Handle(*HandleData<T,A>)
}
@@ -118,7 +113,7 @@ impl<T:Send,A> Handle<T,A> {
**Warning:** the reader is responsible for keeping this data live!
")]
fn set_aux(p: @A) unsafe {
- (**self).read_aux = ptr::addr_of(*p);
+ (**self).read_aux = ptr::to_unsafe_ptr(&*p);
}
#[doc(str = "access the auxiliary data associated with this handle.")]
@@ -159,7 +154,7 @@ fn null_handle<T:Send,A>() -> Handle<T,A> {
_Handle(ptr::null())
}
-fn Scope<T:Send,A>() -> Scope<T,A> {
+pub fn Scope<T:Send,A>() -> Scope<T,A> {
@ScopeResource({mut layout_active: false,
mut free_list: ~[],
mut first_dirty: null_handle()})
@@ -219,12 +214,12 @@ impl<T:Copy Send,A> Scope<T,A> {
let d: *HandleData<T,A> =
cast::reinterpret_cast(
&libc::malloc(sys::size_of::<HandleData<T,A>>() as size_t));
- (*d).read_ptr = self.clone(ptr::addr_of(v));
+ (*d).read_ptr = self.clone(ptr::to_unsafe_ptr(&v));
(*d).write_ptr = cast::reinterpret_cast(&(*d).read_ptr);
(*d).read_aux = ptr::null();
(*d).next_dirty = null_handle();
let h = _Handle(d);
- push(self.d.free_list, h);
+ push(&mut self.d.free_list, h);
return h;
}
}