Fix a stack to use the new .to_c_str() api
This commit is contained in:
parent
a54476b0aa
commit
e7f0882214
1 changed files with 2 additions and 2 deletions
|
|
@ -20,11 +20,11 @@ mod libc {
|
|||
}
|
||||
|
||||
fn atol(s: ~str) -> int {
|
||||
s.as_imm_buf(|x, _len| unsafe { libc::atol(x) })
|
||||
s.to_c_str().with_ref(|x| unsafe { libc::atol(x as *u8) })
|
||||
}
|
||||
|
||||
fn atoll(s: ~str) -> i64 {
|
||||
s.as_imm_buf(|x, _len| unsafe { libc::atoll(x) })
|
||||
s.to_c_str().with_ref(|x| unsafe { libc::atoll(x as *u8) })
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue