File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ use core::raw;
1616#[ inline]
1717#[ deprecated]
1818pub fn get_box_size ( body_size : uint , body_align : uint ) -> uint {
19- let header_size = mem:: size_of :: < raw:: Box < ( ) > > ( ) ;
19+ let header_size = mem:: size_of :: < raw:: GcBox < ( ) > > ( ) ;
2020 let total_size = align_to ( header_size, body_align) + body_size;
2121 total_size
2222}
Original file line number Diff line number Diff line change 2020
2121use mem;
2222
23- /// The representation of a Rust managed box
24- pub struct Box < T > {
23+ /// The representation of `std::gc::Gc`.
24+ pub struct GcBox < T > {
2525 pub ref_count : uint ,
2626 pub drop_glue : fn ( ptr : * mut u8 ) ,
27- pub prev : * mut Box < T > ,
28- pub next : * mut Box < T > ,
27+ pub prev : * mut GcBox < T > ,
28+ pub next : * mut GcBox < T > ,
2929 pub data : T ,
3030}
3131
Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ impl<'a> TyVisitor for ReprVisitor<'a> {
277277 fn visit_box ( & mut self , mtbl : uint , inner : * const TyDesc ) -> bool {
278278 try!( self , self . writer . write ( "box(GC) " . as_bytes ( ) ) ) ;
279279 self . write_mut_qualifier ( mtbl) ;
280- self . get :: < & raw:: Box < ( ) > > ( |this, b| {
280+ self . get :: < & raw:: GcBox < ( ) > > ( |this, b| {
281281 let p = & b. data as * const ( ) as * const u8 ;
282282 this. visit_ptr_inner ( p, inner)
283283 } )
Original file line number Diff line number Diff line change @@ -24,15 +24,15 @@ use task::Task;
2424
2525static RC_IMMORTAL : uint = 0x77777777 ;
2626
27- pub type Box = raw:: Box < ( ) > ;
27+ pub type Box = raw:: GcBox < ( ) > ;
2828
2929pub struct MemoryRegion {
3030 live_allocations : uint ,
3131}
3232
3333pub struct LocalHeap {
3434 memory_region : MemoryRegion ,
35- live_allocs : * mut raw:: Box < ( ) > ,
35+ live_allocs : * mut raw:: GcBox < ( ) > ,
3636}
3737
3838impl LocalHeap {
@@ -161,7 +161,7 @@ impl LocalHeap {
161161 }
162162
163163 unsafe fn each_live_alloc ( & mut self , read_next_before : bool ,
164- f : |& mut LocalHeap , alloc : * mut raw:: Box < ( ) > |) {
164+ f : |& mut LocalHeap , alloc : * mut raw:: GcBox < ( ) > |) {
165165 //! Walks the internal list of allocations
166166
167167 let mut alloc = self . live_allocs ;
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ impl<T: Default + 'static> Default for Gc<T> {
8989 }
9090}
9191
92- impl < T : ' static > raw:: Repr < * const raw:: Box < T > > for Gc < T > { }
92+ impl < T : ' static > raw:: Repr < * const raw:: GcBox < T > > for Gc < T > { }
9393
9494impl < S : hash:: Writer , T : hash:: Hash < S > + ' static > hash:: Hash < S > for Gc < T > {
9595 fn hash ( & self , s : & mut S ) {
You can’t perform that action at this time.
0 commit comments