File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 9c0b469613d58eba7d5f15625b589218fc903e66
2
+ refs/heads/master: 152f2eade87b7930a83f9cc8da8cae08769b2faf
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5
5
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ fn clone<T: const send>(rc: &arc<T>) -> arc<T> {
84
84
}
85
85
86
86
// 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 } ;
88
88
type exclusive < T : send > = arc_destruct < ex_data < T > > ;
89
89
90
90
fn exclusive < T : send > ( -data : T ) -> exclusive < T > {
@@ -110,12 +110,12 @@ impl methods<T: send> for exclusive<T> {
110
110
arc_destruct ( self . data )
111
111
}
112
112
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 {
114
114
let ptr: ~arc_data < ex_data < T > > =
115
115
unsafe :: reinterpret_cast ( self . data ) ;
116
116
let r = {
117
117
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 ) )
119
119
} ;
120
120
unsafe :: forget ( ptr) ;
121
121
r
You can’t perform that action at this time.
0 commit comments