Revert "Reference and whitespace fixes."
This reverts commit 52f1904ddd
.
This commit is contained in:
parent
416b3bfea4
commit
69447e9002
2 changed files with 5 additions and 8 deletions
|
@ -102,14 +102,11 @@ impl methods<T> for exclusive<T> {
|
||||||
fn with<U>(f: fn(sys::condition, x: &T) -> U) -> U {
|
fn with<U>(f: fn(sys::condition, x: &T) -> U) -> U {
|
||||||
unsafe {
|
unsafe {
|
||||||
let ptr: ~arc_data<ex_data<T>> = unsafe::reinterpret_cast(*self);
|
let ptr: ~arc_data<ex_data<T>> = unsafe::reinterpret_cast(*self);
|
||||||
let r = {
|
|
||||||
let rec: &ex_data<T> = &(*ptr).data;
|
let rec: &ex_data<T> = &(*ptr).data;
|
||||||
|
unsafe::forget(ptr);
|
||||||
rec.lock.lock_cond() {|c|
|
rec.lock.lock_cond() {|c|
|
||||||
f(c, &rec.data)
|
f(c, &rec.data)
|
||||||
}
|
}
|
||||||
};
|
|
||||||
unsafe::forget(ptr);
|
|
||||||
r
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue