Port the stdlib to the typaram foo<T> syntax.

This commit is contained in:
Erick Tryzelaar
2011-08-10 09:27:11 -07:00
committed by Graydon Hoare
parent 8043788e3a
commit f764f9a8cf
19 changed files with 144 additions and 144 deletions

View File

@@ -59,7 +59,7 @@ resource FILE_res(f: os::libc::FILE) {
os::libc::fclose(f);
}
obj FILE_buf_reader(f: os::libc::FILE, res: option::t[@FILE_res]) {
obj FILE_buf_reader(f: os::libc::FILE, res: option::t<@FILE_res>) {
fn read(len: uint) -> [u8] {
let buf = ~[];
vec::reserve[u8](buf, len);
@@ -243,7 +243,7 @@ type buf_writer =
fn tell() -> uint ;
};
obj FILE_writer(f: os::libc::FILE, res: option::t[@FILE_res]) {
obj FILE_writer(f: os::libc::FILE, res: option::t<@FILE_res>) {
fn write(v: &[u8]) {
let len = vec::len[u8](v);
let vbuf = vec::to_ptr[u8](v);
@@ -262,7 +262,7 @@ resource fd_res(fd: int) {
os::libc::close(fd);
}
obj fd_buf_writer(fd: int, res: option::t[@fd_res]) {
obj fd_buf_writer(fd: int, res: option::t<@fd_res>) {
fn write(v: &[u8]) {
let len = vec::len[u8](v);
let count = 0u;