std: rename str.as_buf to as_imm_buf, add str.as_mut_buf
This commit is contained in:
parent
3b818edeba
commit
cc9666f68f
3 changed files with 65 additions and 71 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue