sqlite_tiny/ffi/mod.rs
1//! FFI bindings to the shipped sqlite variant
2
3#![allow(unused, reason = "Includes autogenerated bindings")]
4#![allow(non_snake_case, reason = "Includes autogenerated bindings")]
5#![allow(non_camel_case_types, reason = "Includes autogenerated bindings")]
6
7include!("bindgen.rs");
8
9// Glue bindings
10unsafe extern "C" {
11 /// Internal helper to get the pointer constant to define "transient" ownership (i.e. order SQLite to copy the value
12 /// immediately)
13 //sqlite3_destructor_type sqlite3_transient()
14 pub unsafe fn sqlite3_transient() -> sqlite3_destructor_type;
15}
16
17/// Asserts that sqlite is compiled threadsafe
18#[test]
19fn assert_threadsafe() {
20 let threadsafe = unsafe { sqlite3_threadsafe() };
21 assert_ne!(threadsafe, 0, "sqlite is not compiled threadsafe?!")
22}