Reference and whitespace fixes.

This commit is contained in:
Eric Holk 2012-06-15 22:14:02 -04:00
parent 21d56f2c68
commit 52f1904ddd
2 changed files with 8 additions and 5 deletions

View File

@ -102,11 +102,14 @@ impl methods<T> for exclusive<T> {
fn with<U>(f: fn(sys::condition, x: &T) -> U) -> U {
unsafe {
let ptr: ~arc_data<ex_data<T>> = unsafe::reinterpret_cast(*self);
let rec: &ex_data<T> = &(*ptr).data;
let r = {
let rec: &ex_data<T> = &(*ptr).data;
rec.lock.lock_cond() {|c|
f(c, &rec.data)
}
};
unsafe::forget(ptr);
rec.lock.lock_cond() {|c|
f(c, &rec.data)
}
r
}
}
}

View File

@ -454,7 +454,7 @@ fn id_visitor(vfn: fn@(node_id)) -> visit::vt<()> {
visit_expr: fn@(e: @expr) {
vfn(e.id);
alt e.node {
alt e.node {
expr_index(*) | expr_assign_op(*) |
expr_unary(*) | expr_binary(*) {
vfn(ast_util::op_expr_callee_id(e));