File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed 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