]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/c-stack-returning-int64.rs
Add ToCStr method .with_c_str()
[rust.git] / src / test / run-pass / c-stack-returning-int64.rs
index e91c11f5cd0a703eea86f5080aec6051d1c52bf9..22c5e9dad25a4723cab72ca83277e7daf3acf79d 100644 (file)
@@ -20,11 +20,11 @@ mod libc {
 }
 
 fn atol(s: ~str) -> int {
-    s.to_c_str().with_ref(|x| unsafe { libc::atol(x as *u8) })
+    s.with_c_str(|x| unsafe { libc::atol(x as *u8) })
 }
 
 fn atoll(s: ~str) -> i64 {
-    s.to_c_str().with_ref(|x| unsafe { libc::atoll(x as *u8) })
+    s.with_c_str(|x| unsafe { libc::atoll(x as *u8) })
 }
 
 pub fn main() {