diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2014-01-21 09:31:32 -0500 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2014-01-22 23:13:53 -0500 |
| commit | 802d41fe235794d84084897ae6187ee5cc27dd95 (patch) | |
| tree | 6cd1eecb0ec529673396040e2c43ad08941732e9 /src/libextra | |
| parent | fce792249e72a181f2ad52413b25b1db643c371f (diff) | |
| download | rust-802d41fe235794d84084897ae6187ee5cc27dd95.tar.gz rust-802d41fe235794d84084897ae6187ee5cc27dd95.zip | |
libc: switch `free` to the proper signature
This does not attempt to fully propagate the mutability everywhere, but gives new code a hint to avoid the same issues.
Diffstat (limited to 'src/libextra')
| -rw-r--r-- | src/libextra/c_vec.rs | 2 | ||||
| -rw-r--r-- | src/libextra/flate.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libextra/c_vec.rs b/src/libextra/c_vec.rs index fc2caa13584..35a6ccaa708 100644 --- a/src/libextra/c_vec.rs +++ b/src/libextra/c_vec.rs @@ -172,7 +172,7 @@ mod tests { let mem = malloc_raw(n); CVec::new_with_dtor(mem as *mut u8, n, - proc() { libc::free(mem as *c_void); }) + proc() { libc::free(mem as *mut c_void); }) } } diff --git a/src/libextra/flate.rs b/src/libextra/flate.rs index 1153c3a6ef3..faceb17af47 100644 --- a/src/libextra/flate.rs +++ b/src/libextra/flate.rs @@ -53,7 +53,7 @@ fn deflate_bytes_internal(bytes: &[u8], flags: c_int) -> ~[u8] { assert!(res as int != 0); let out = vec::raw::from_buf_raw(res as *u8, outsz as uint); - libc::free(res); + libc::free(res as *mut c_void); out } } @@ -76,7 +76,7 @@ fn inflate_bytes_internal(bytes: &[u8], flags: c_int) -> ~[u8] { assert!(res as int != 0); let out = vec::raw::from_buf_raw(res as *u8, outsz as uint); - libc::free(res); + libc::free(res as *mut c_void); out } } |
