@@ -490,25 +490,25 @@ pub fn FILERes(f: *libc::FILE) -> FILERes {
490
490
}
491
491
}
492
492
493
- pub fn FILE_reader ( f : * libc:: FILE , cleanup : bool ) -> Reader {
493
+ pub fn FILE_reader ( f : * libc:: FILE , cleanup : bool ) -> @ Reader {
494
494
if cleanup {
495
- Wrapper { base : f, cleanup : FILERes ( f) } as Reader
495
+ @ Wrapper { base : f, cleanup : FILERes ( f) } as @ Reader
496
496
} else {
497
- f as Reader
497
+ @ f as @ Reader
498
498
}
499
499
}
500
500
501
501
// FIXME (#2004): this should either be an trait-less impl, a set of
502
502
// top-level functions that take a reader, or a set of default methods on
503
503
// reader (which can then be called reader)
504
504
505
- pub fn stdin ( ) -> Reader {
505
+ pub fn stdin ( ) -> @ Reader {
506
506
unsafe {
507
- rustrt:: rust_get_stdin ( ) as Reader
507
+ rustrt:: rust_get_stdin ( ) as @ Reader
508
508
}
509
509
}
510
510
511
- pub fn file_reader ( path : & Path ) -> Result < Reader , ~str > {
511
+ pub fn file_reader ( path : & Path ) -> Result < @ Reader , ~str > {
512
512
unsafe {
513
513
let f = os:: as_c_charp ( path. to_str ( ) , |pathbuf| {
514
514
os:: as_c_charp ( "r" , |modebuf|
@@ -555,11 +555,11 @@ impl BytesReader: Reader {
555
555
fn tell(&self) -> uint { self.pos }
556
556
}
557
557
558
- pub pure fn with_bytes_reader<t>(bytes: &[u8], f: fn(Reader) -> t) -> t {
559
- f(BytesReader { bytes: bytes, pos: 0u } as Reader)
558
+ pub pure fn with_bytes_reader<t>(bytes: &[u8], f: fn(@ Reader) -> t) -> t {
559
+ f(@ BytesReader { bytes: bytes, pos: 0u } as @ Reader)
560
560
}
561
561
562
- pub pure fn with_str_reader<T>(s: &str, f: fn(Reader) -> T) -> T {
562
+ pub pure fn with_str_reader<T>(s: &str, f: fn(@ Reader) -> T) -> T {
563
563
str::byte_slice(s, |bytes| with_bytes_reader(bytes, f))
564
564
}
565
565
0 commit comments