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> {
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 } ;
8888type exclusive < T : send > = arc_destruct < ex_data < T > > ;
8989
9090fn 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
You can’t perform that action at this time.
0 commit comments