diff options
| author | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-08-07 20:25:38 -0700 |
|---|---|---|
| committer | Erick Tryzelaar <erick.tryzelaar@gmail.com> | 2013-08-07 20:25:38 -0700 |
| commit | e7f08822147c495592bef83eeb835640a6342a2a (patch) | |
| tree | 75eee1111417a734f34d60b3e86590277d2c73ec | |
| parent | a54476b0aa9f7ca00e8f8c12fc327cf79815054a (diff) | |
| download | rust-e7f08822147c495592bef83eeb835640a6342a2a.tar.gz rust-e7f08822147c495592bef83eeb835640a6342a2a.zip | |
Fix a stack to use the new .to_c_str() api
| -rw-r--r-- | src/test/run-pass/c-stack-returning-int64.rs | 4 |
1 files 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 9775f1ef45a..e91c11f5cd0 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() { |
