From e7f08822147c495592bef83eeb835640a6342a2a Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Wed, 7 Aug 2013 20:25:38 -0700 Subject: [PATCH] Fix a stack to use the new .to_c_str() api --- src/test/run-pass/c-stack-returning-int64.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/run-pass/c-stack-returning-int64.rs b/src/test/run-pass/c-stack-returning-int64.rs index 9775f1ef45a7..e91c11f5cd0a 100644 --- a/src/test/run-pass/c-stack-returning-int64.rs +++ b/src/test/run-pass/c-stack-returning-int64.rs @@ -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() {