1 #![allow(non_snake_case, non_camel_case_types)] 2 #![cfg_attr(test, allow(deref_nullptr))] // https://github.com/rust-lang/rust-bindgen/issues/2066 3 4 // force linking to openssl 5 #[cfg(feature = "bundled-sqlcipher-vendored-openssl")] 6 extern crate openssl_sys; 7 8 pub use self::error::*; 9 10 use std::mem; 11 12 mod error; 13 14 #[must_use] SQLITE_STATIC() -> sqlite3_destructor_type15pub fn SQLITE_STATIC() -> sqlite3_destructor_type { 16 None 17 } 18 19 #[must_use] SQLITE_TRANSIENT() -> sqlite3_destructor_type20pub fn SQLITE_TRANSIENT() -> sqlite3_destructor_type { 21 Some(unsafe { mem::transmute::<isize, unsafe extern "C" fn(*mut std::ffi::c_void)>(-1_isize) }) 22 } 23 24 #[allow(clippy::all)] 25 mod bindings { 26 include!(concat!(env!("OUT_DIR"), "/bindgen.rs")); 27 } 28 pub use bindings::*; 29 30 impl Default for sqlite3_vtab { default() -> Self31 fn default() -> Self { 32 unsafe { mem::zeroed() } 33 } 34 } 35 36 impl Default for sqlite3_vtab_cursor { default() -> Self37 fn default() -> Self { 38 unsafe { mem::zeroed() } 39 } 40 } 41