Fix a stack to use the new .to_c_str() api

This commit is contained in:
Erick Tryzelaar 2013-08-07 20:25:38 -07:00
parent a54476b0aa
commit e7f0882214
1 changed files with 2 additions and 2 deletions

View File

@ -20,11 +20,11 @@ mod libc {
} }
fn atol(s: ~str) -> int { 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 { 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() { pub fn main() {