refactor: move aheader to safe rust

This commit is contained in:
dignifiedquire
2019-05-12 19:05:33 +01:00
parent 00314ffbe0
commit fdd870286e
17 changed files with 468 additions and 630 deletions

View File

@@ -24,7 +24,7 @@ pub fn isdigit(mut _c: libc::c_int) -> libc::c_int {
}
}
pub unsafe extern "C" fn dc_urlencode(to_encode: *const libc::c_char) -> *mut libc::c_char {
pub unsafe fn dc_urlencode(to_encode: *const libc::c_char) -> *mut libc::c_char {
let mut pstr: *const libc::c_char = to_encode;
if to_encode.is_null() {
return dc_strdup(b"\x00" as *const u8 as *const libc::c_char);