core: Rename str::from_cstr et. al to from_buf

This commit is contained in:
Brian Anderson
2012-03-14 14:02:07 -07:00
parent 9e480708a2
commit 3a2df84d89
4 changed files with 26 additions and 26 deletions

View File

@@ -66,7 +66,7 @@ fn fill_charp_buf(f: fn(*mutable c_char, size_t) -> bool)
let buf = vec::to_mut(vec::from_elem(tmpbuf_sz, 0u8 as c_char));
vec::as_mut_buf(buf) { |b|
if f(b, tmpbuf_sz as size_t) {
some(str::from_cstr(b as *u8))
some(str::from_buf(b as *u8))
} else {
none
}
@@ -125,7 +125,7 @@ fn getenv(n: str) -> option<str> unsafe {
option::none::<str>
} else {
let s = unsafe::reinterpret_cast(s);
option::some::<str>(str::from_cstr(s))
option::some::<str>(str::from_buf(s))
};
}