blob: f1d73635f1b86d5024dea2ab78a9074710508aa6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
// Unsafe pointer utility functions.
native "rust-intrinsic" mod rusti {
fn addr_of[T](val: &T) -> *mutable T;
fn ptr_offset[T](ptr: *T, count: uint) -> *T;
}
fn addr_of[T](val: &T) -> *mutable T { ret rusti::addr_of(val); }
fn offset[T](ptr: *T, count: uint) -> *T {
ret rusti::ptr_offset(ptr, count);
}
|