std: rename str.as_buf to as_imm_buf, add str.as_mut_buf

This commit is contained in:
Erick Tryzelaar 2013-07-22 21:48:22 -07:00
parent 3b818edeba
commit cc9666f68f
3 changed files with 65 additions and 71 deletions

View file

@ -20,11 +20,11 @@ mod libc {
}
fn atol(s: ~str) -> int {
s.as_buf(|x, _len| unsafe { libc::atol(x) })
s.as_imm_buf(|x, _len| unsafe { libc::atol(x) })
}
fn atoll(s: ~str) -> i64 {
s.as_buf(|x, _len| unsafe { libc::atoll(x) })
s.as_imm_buf(|x, _len| unsafe { libc::atoll(x) })
}
pub fn main() {