From a5c460a8f702330821bee755af205e440948324c Mon Sep 17 00:00:00 2001 From: gwenn Date: Sat, 25 Mar 2023 15:38:24 +0100 Subject: [PATCH] Fix sqlite3_cancel_auto_extension --- .../bindgen-bindings/bindgen_3.14.0.rs | 17 ++++++++++---- libsqlite3-sys/build.rs | 23 +++++++++++++++---- .../sqlcipher/bindgen_bundled_version.rs | 17 ++++++++++---- .../sqlite3/bindgen_bundled_version.rs | 17 ++++++++++---- 4 files changed, 55 insertions(+), 19 deletions(-) diff --git a/libsqlite3-sys/bindgen-bindings/bindgen_3.14.0.rs b/libsqlite3-sys/bindgen-bindings/bindgen_3.14.0.rs index cf8edc6..d853ca8 100644 --- a/libsqlite3-sys/bindgen-bindings/bindgen_3.14.0.rs +++ b/libsqlite3-sys/bindgen-bindings/bindgen_3.14.0.rs @@ -12,6 +12,18 @@ extern "C" { ) -> ::std::os::raw::c_int; } +extern "C" { + pub fn sqlite3_cancel_auto_extension( + xEntryPoint: ::std::option::Option< + unsafe extern "C" fn( + db: *mut sqlite3, + pzErrMsg: *mut *const ::std::os::raw::c_char, + pThunk: *const sqlite3_api_routines, + ) -> ::std::os::raw::c_int, + >, + ) -> ::std::os::raw::c_int; +} + pub const SQLITE_VERSION: &[u8; 7usize] = b"3.14.0\0"; pub const SQLITE_VERSION_NUMBER: i32 = 3014000; pub const SQLITE_SOURCE_ID: &[u8; 61usize] = @@ -1741,11 +1753,6 @@ extern "C" { onoff: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn sqlite3_cancel_auto_extension( - xEntryPoint: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} extern "C" { pub fn sqlite3_reset_auto_extension(); } diff --git a/libsqlite3-sys/build.rs b/libsqlite3-sys/build.rs index a592bb8..612ab3d 100644 --- a/libsqlite3-sys/build.rs +++ b/libsqlite3-sys/build.rs @@ -527,13 +527,28 @@ mod bindings { .raw_line( r#"extern "C" { pub fn sqlite3_auto_extension( - xEntryPoint: ::std::option::Option ::std::os::raw::c_int>, + xEntryPoint: ::std::option::Option< + unsafe extern "C" fn( + db: *mut sqlite3, + pzErrMsg: *mut *const ::std::os::raw::c_char, + pThunk: *const sqlite3_api_routines, + ) -> ::std::os::raw::c_int, + >, ) -> ::std::os::raw::c_int; }"#, ) + .blocklist_function("sqlite3_cancel_auto_extension") + .raw_line(r#"extern "C" { + pub fn sqlite3_cancel_auto_extension( + xEntryPoint: ::std::option::Option< + unsafe extern "C" fn( + db: *mut sqlite3, + pzErrMsg: *mut *const ::std::os::raw::c_char, + pThunk: *const sqlite3_api_routines, + ) -> ::std::os::raw::c_int, + >, + ) -> ::std::os::raw::c_int; +}"#) .rustfmt_bindings(true); if cfg!(any(feature = "sqlcipher", feature = "bundled-sqlcipher")) { diff --git a/libsqlite3-sys/sqlcipher/bindgen_bundled_version.rs b/libsqlite3-sys/sqlcipher/bindgen_bundled_version.rs index 52d91d7..941dbfb 100644 --- a/libsqlite3-sys/sqlcipher/bindgen_bundled_version.rs +++ b/libsqlite3-sys/sqlcipher/bindgen_bundled_version.rs @@ -12,6 +12,18 @@ extern "C" { ) -> ::std::os::raw::c_int; } +extern "C" { + pub fn sqlite3_cancel_auto_extension( + xEntryPoint: ::std::option::Option< + unsafe extern "C" fn( + db: *mut sqlite3, + pzErrMsg: *mut *const ::std::os::raw::c_char, + pThunk: *const sqlite3_api_routines, + ) -> ::std::os::raw::c_int, + >, + ) -> ::std::os::raw::c_int; +} + pub const SQLITE_VERSION: &[u8; 7usize] = b"3.39.4\0"; pub const SQLITE_VERSION_NUMBER: i32 = 3039004; pub const SQLITE_SOURCE_ID: &[u8; 85usize] = @@ -2048,11 +2060,6 @@ extern "C" { onoff: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn sqlite3_cancel_auto_extension( - xEntryPoint: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} extern "C" { pub fn sqlite3_reset_auto_extension(); } diff --git a/libsqlite3-sys/sqlite3/bindgen_bundled_version.rs b/libsqlite3-sys/sqlite3/bindgen_bundled_version.rs index 7e7d6b3..256c80f 100644 --- a/libsqlite3-sys/sqlite3/bindgen_bundled_version.rs +++ b/libsqlite3-sys/sqlite3/bindgen_bundled_version.rs @@ -12,6 +12,18 @@ extern "C" { ) -> ::std::os::raw::c_int; } +extern "C" { + pub fn sqlite3_cancel_auto_extension( + xEntryPoint: ::std::option::Option< + unsafe extern "C" fn( + db: *mut sqlite3, + pzErrMsg: *mut *const ::std::os::raw::c_char, + pThunk: *const sqlite3_api_routines, + ) -> ::std::os::raw::c_int, + >, + ) -> ::std::os::raw::c_int; +} + pub const SQLITE_VERSION: &[u8; 7usize] = b"3.41.2\0"; pub const SQLITE_VERSION_NUMBER: i32 = 3041002; pub const SQLITE_SOURCE_ID: &[u8; 85usize] = @@ -2021,11 +2033,6 @@ extern "C" { onoff: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn sqlite3_cancel_auto_extension( - xEntryPoint: ::std::option::Option, - ) -> ::std::os::raw::c_int; -} extern "C" { pub fn sqlite3_reset_auto_extension(); }