remove unused task ptr arg

This commit is contained in:
Niko Matsakis 2011-10-23 07:21:14 -07:00 committed by Brian Anderson
parent c81808a9f7
commit e308f3346b

View File

@ -2,26 +2,24 @@
import option::{some, none};
import uint::next_power_of_two;
import ptr::{addr_of, null};
import ptr::addr_of;
native "rust-intrinsic" mod rusti {
fn vec_len<T>(&&v: [mutable? T]) -> uint;
}
native "c-stack-cdecl" mod rustrt {
fn vec_reserve_shared<T>(dummy: *util::void,
t: *sys::type_desc,
fn vec_reserve_shared<T>(t: *sys::type_desc,
&v: [mutable? T],
n: uint);
fn vec_from_buf_shared<T>(dummy: *util::void,
t: *sys::type_desc,
fn vec_from_buf_shared<T>(t: *sys::type_desc,
ptr: *T,
count: uint) -> [T];
}
/// Reserves space for `n` elements in the given vector.
fn reserve<@T>(&v: [mutable? T], n: uint) {
rustrt::vec_reserve_shared(null(), sys::get_type_desc::<T>(), v, n);
rustrt::vec_reserve_shared(sys::get_type_desc::<T>(), v, n);
}
pure fn len<T>(v: [mutable? T]) -> uint { unchecked { rusti::vec_len(v) } }
@ -358,7 +356,7 @@ mod unsafe {
type vec_repr = {mutable fill: uint, mutable alloc: uint, data: u8};
unsafe fn from_buf<@T>(ptr: *T, elts: uint) -> [T] {
ret rustrt::vec_from_buf_shared(null(), sys::get_type_desc::<T>(),
ret rustrt::vec_from_buf_shared(sys::get_type_desc::<T>(),
ptr, elts);
}