From 11d0443af19cd3ce14f7bc3ab26982460442e9f2 Mon Sep 17 00:00:00 2001 From: gwenn Date: Fri, 10 Nov 2023 17:52:17 +0000 Subject: [PATCH] Regenerate bindgen_bundled_version_ext.rs for version 3.44.0 --- .../sqlite3/bindgen_bundled_version.rs | 2 +- .../sqlite3/bindgen_bundled_version_ext.rs | 76 ++++++++++++++++++- libsqlite3-sys/upgrade.sh | 2 +- 3 files changed, 74 insertions(+), 6 deletions(-) diff --git a/libsqlite3-sys/sqlite3/bindgen_bundled_version.rs b/libsqlite3-sys/sqlite3/bindgen_bundled_version.rs index 76eea10..ef59419 100644 --- a/libsqlite3-sys/sqlite3/bindgen_bundled_version.rs +++ b/libsqlite3-sys/sqlite3/bindgen_bundled_version.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.68.1 */ +/* automatically generated by rust-bindgen 0.69.1 */ extern "C" { pub fn sqlite3_auto_extension( diff --git a/libsqlite3-sys/sqlite3/bindgen_bundled_version_ext.rs b/libsqlite3-sys/sqlite3/bindgen_bundled_version_ext.rs index ed7fc5c..f64ecd2 100644 --- a/libsqlite3-sys/sqlite3/bindgen_bundled_version_ext.rs +++ b/libsqlite3-sys/sqlite3/bindgen_bundled_version_ext.rs @@ -1,9 +1,9 @@ -/* automatically generated by rust-bindgen 0.68.1 */ +/* automatically generated by rust-bindgen 0.69.1 */ -pub const SQLITE_VERSION: &[u8; 7] = b"3.43.2\0"; -pub const SQLITE_VERSION_NUMBER: i32 = 3043002; +pub const SQLITE_VERSION: &[u8; 7] = b"3.44.0\0"; +pub const SQLITE_VERSION_NUMBER: i32 = 3044000; pub const SQLITE_SOURCE_ID: &[u8; 85] = - b"2023-10-10 12:14:04 4310099cce5a487035fa535dd3002c59ac7f1d1bec68d7cf317fd3e769484790\0"; + b"2023-11-01 11:23:50 17129ba1ff7f0daf37100ee82d507aef7827cf38de1866e2633096ae6ad81301\0"; pub const SQLITE_OK: i32 = 0; pub const SQLITE_ERROR: i32 = 1; pub const SQLITE_INTERNAL: i32 = 2; @@ -374,6 +374,7 @@ pub const SQLITE_TESTCTRL_FIRST: i32 = 5; pub const SQLITE_TESTCTRL_PRNG_SAVE: i32 = 5; pub const SQLITE_TESTCTRL_PRNG_RESTORE: i32 = 6; pub const SQLITE_TESTCTRL_PRNG_RESET: i32 = 7; +pub const SQLITE_TESTCTRL_FK_NO_ACTION: i32 = 7; pub const SQLITE_TESTCTRL_BITVEC_TEST: i32 = 8; pub const SQLITE_TESTCTRL_FAULT_INSTALL: i32 = 9; pub const SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS: i32 = 10; @@ -912,6 +913,15 @@ pub struct sqlite3_module { pub xShadowName: ::std::option::Option< unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int, >, + pub xIntegrity: ::std::option::Option< + unsafe extern "C" fn( + pVTab: *mut sqlite3_vtab, + zSchema: *const ::std::os::raw::c_char, + zTabName: *const ::std::os::raw::c_char, + mFlags: ::std::os::raw::c_int, + pzErr: *mut *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int, + >, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2872,6 +2882,20 @@ pub struct sqlite3_api_routines { arg2: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int, >, + pub get_clientdata: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3, + arg2: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_void, + >, + pub set_clientdata: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut sqlite3, + arg2: *const ::std::os::raw::c_char, + arg3: *mut ::std::os::raw::c_void, + arg4: ::std::option::Option, + ) -> ::std::os::raw::c_int, + >, } pub type sqlite3_loadext_entry = ::std::option::Option< unsafe extern "C" fn( @@ -7425,6 +7449,48 @@ pub unsafe fn sqlite3_stmt_explain( (fun)(arg1, arg2) } +static __SQLITE3_GET_CLIENTDATA: ::atomic::Atomic< + Option< + unsafe extern "C" fn( + arg1: *mut sqlite3, + arg2: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_void, + >, +> = ::atomic::Atomic::new(None); +pub unsafe fn sqlite3_get_clientdata( + arg1: *mut sqlite3, + arg2: *const ::std::os::raw::c_char, +) -> *mut ::std::os::raw::c_void { + let fun = __SQLITE3_GET_CLIENTDATA + .load(::atomic::Ordering::Acquire) + .expect("SQLite API not initialized or SQLite feature omitted"); + (fun)(arg1, arg2) +} + +static __SQLITE3_SET_CLIENTDATA: ::atomic::Atomic< + Option< + unsafe extern "C" fn( + arg1: *mut sqlite3, + arg2: *const ::std::os::raw::c_char, + arg3: *mut ::std::os::raw::c_void, + arg4: ::std::option::Option< + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void), + >, + ) -> ::std::os::raw::c_int, + >, +> = ::atomic::Atomic::new(None); +pub unsafe fn sqlite3_set_clientdata( + arg1: *mut sqlite3, + arg2: *const ::std::os::raw::c_char, + arg3: *mut ::std::os::raw::c_void, + arg4: ::std::option::Option, +) -> ::std::os::raw::c_int { + let fun = __SQLITE3_SET_CLIENTDATA + .load(::atomic::Ordering::Acquire) + .expect("SQLite API not initialized or SQLite feature omitted"); + (fun)(arg1, arg2, arg3, arg4) +} + /// Like SQLITE_EXTENSION_INIT2 macro pub unsafe fn rusqlite_extension_init2( p_api: *mut sqlite3_api_routines, @@ -7757,6 +7823,8 @@ pub unsafe fn rusqlite_extension_init2( __SQLITE3_VALUE_ENCODING.store((*p_api).value_encoding, ::atomic::Ordering::Release); __SQLITE3_IS_INTERRUPTED.store((*p_api).is_interrupted, ::atomic::Ordering::Release); __SQLITE3_STMT_EXPLAIN.store((*p_api).stmt_explain, ::atomic::Ordering::Release); + __SQLITE3_GET_CLIENTDATA.store((*p_api).get_clientdata, ::atomic::Ordering::Release); + __SQLITE3_SET_CLIENTDATA.store((*p_api).set_clientdata, ::atomic::Ordering::Release); Ok(()) } diff --git a/libsqlite3-sys/upgrade.sh b/libsqlite3-sys/upgrade.sh index 3965216..5a9da28 100755 --- a/libsqlite3-sys/upgrade.sh +++ b/libsqlite3-sys/upgrade.sh @@ -28,7 +28,7 @@ find "$TARGET_DIR" -type f -name bindgen.rs -exec mv {} "$SQLITE3_LIB_DIR/bindge # Regenerate bindgen file for sqlite3ext.h # some sqlite3_api_routines fields are function pointers with va_list arg but currently stable Rust doesn't support this type. # FIXME how to generate portable bindings without : -sed -i '' 's/va_list/void*/' "$SQLITE3_LIB_DIR/sqlite3ext.h" +sed -i'' -e 's/va_list/void*/' "$SQLITE3_LIB_DIR/sqlite3ext.h" rm -f "$SQLITE3_LIB_DIR/bindgen_bundled_version_ext.rs" find "$TARGET_DIR" -type f -name bindgen.rs -exec rm {} \; env LIBSQLITE3_SYS_BUNDLING=1 cargo build --features "buildtime_bindgen loadable_extension" --no-default-features