Skip to content

Commit 51fc791

Browse files
committed
---
yaml --- r: 22433 b: refs/heads/master c: 152f2ea h: refs/heads/master i: 22431: 5ba42b4 v: v3
1 parent f9a6955 commit 51fc791

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9c0b469613d58eba7d5f15625b589218fc903e66
2+
refs/heads/master: 152f2eade87b7930a83f9cc8da8cae08769b2faf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libcore/arc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ fn clone<T: const send>(rc: &arc<T>) -> arc<T> {
8484
}
8585

8686
// An arc over mutable data that is protected by a lock.
87-
type ex_data<T: send> = {lock: sys::lock_and_signal, data: T};
87+
type ex_data<T: send> = {lock: sys::lock_and_signal, mut data: T};
8888
type exclusive<T: send> = arc_destruct<ex_data<T>>;
8989

9090
fn exclusive<T:send >(-data: T) -> exclusive<T> {
@@ -110,12 +110,12 @@ impl methods<T: send> for exclusive<T> {
110110
arc_destruct(self.data)
111111
}
112112

113-
unsafe fn with<U>(f: fn(sys::condition, x: &T) -> U) -> U {
113+
unsafe fn with<U>(f: fn(sys::condition, x: &mut T) -> U) -> U {
114114
let ptr: ~arc_data<ex_data<T>> =
115115
unsafe::reinterpret_cast(self.data);
116116
let r = {
117117
let rec: &ex_data<T> = &(*ptr).data;
118-
rec.lock.lock_cond(|c| f(c, &rec.data))
118+
rec.lock.lock_cond(|c| f(c, &mut rec.data))
119119
};
120120
unsafe::forget(ptr);
121121
r

0 commit comments

Comments
 (0)