Loading openssl-sys/src/crypto.rs +35 −23 Original line number Diff line number Diff line use libc::*; use *; cfg_if! { if #[cfg(ossl110)] { #[cfg(ossl110)] #[inline] #[track_caller] pub unsafe fn OPENSSL_malloc(num: usize) -> *mut c_void { CRYPTO_malloc(num, concat!(file!(), "\0").as_ptr() as *const _, line!() as _) CRYPTO_malloc( num, concat!(file!(), "\0").as_ptr() as *const _, line!() as _, ) } #[cfg(not(ossl110))] #[inline] #[track_caller] pub unsafe fn OPENSSL_free(addr: *mut c_void) { CRYPTO_free(addr, concat!(file!(), "\0").as_ptr() as *const _, line!() as _) pub unsafe fn OPENSSL_malloc(num: c_int) -> *mut c_void { CRYPTO_malloc( num, concat!(file!(), "\0").as_ptr() as *const _, line!() as _, ) } } else { #[cfg(ossl110)] #[inline] #[track_caller] pub unsafe fn OPENSSL_malloc(num: c_int) -> *mut c_void { CRYPTO_malloc(num, concat!(file!(), "\0").as_ptr() as *const _, line!() as _) pub unsafe fn OPENSSL_free(addr: *mut c_void) { CRYPTO_free( addr, concat!(file!(), "\0").as_ptr() as *const _, line!() as _, ) } #[cfg(not(ossl110))] #[inline] pub unsafe fn CRYPTO_free(addr: *mut c_void) { CRYPTO_free(addr) } } } #[cfg(not(ossl110))] pub const CRYPTO_LOCK_X509: c_int = 3; Loading Loading
openssl-sys/src/crypto.rs +35 −23 Original line number Diff line number Diff line use libc::*; use *; cfg_if! { if #[cfg(ossl110)] { #[cfg(ossl110)] #[inline] #[track_caller] pub unsafe fn OPENSSL_malloc(num: usize) -> *mut c_void { CRYPTO_malloc(num, concat!(file!(), "\0").as_ptr() as *const _, line!() as _) CRYPTO_malloc( num, concat!(file!(), "\0").as_ptr() as *const _, line!() as _, ) } #[cfg(not(ossl110))] #[inline] #[track_caller] pub unsafe fn OPENSSL_free(addr: *mut c_void) { CRYPTO_free(addr, concat!(file!(), "\0").as_ptr() as *const _, line!() as _) pub unsafe fn OPENSSL_malloc(num: c_int) -> *mut c_void { CRYPTO_malloc( num, concat!(file!(), "\0").as_ptr() as *const _, line!() as _, ) } } else { #[cfg(ossl110)] #[inline] #[track_caller] pub unsafe fn OPENSSL_malloc(num: c_int) -> *mut c_void { CRYPTO_malloc(num, concat!(file!(), "\0").as_ptr() as *const _, line!() as _) pub unsafe fn OPENSSL_free(addr: *mut c_void) { CRYPTO_free( addr, concat!(file!(), "\0").as_ptr() as *const _, line!() as _, ) } #[cfg(not(ossl110))] #[inline] pub unsafe fn CRYPTO_free(addr: *mut c_void) { CRYPTO_free(addr) } } } #[cfg(not(ossl110))] pub const CRYPTO_LOCK_X509: c_int = 3; Loading