mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-25 02:21:37 +08:00
Omit deprecated functions
This commit is contained in:
parent
f9d69410ef
commit
3742efe24c
@ -2509,18 +2509,6 @@ pub unsafe fn sqlite3_aggregate_context(
|
||||
(fun)(arg1, nBytes)
|
||||
}
|
||||
|
||||
static __SQLITE3_AGGREGATE_COUNT: ::atomic::Atomic<
|
||||
Option<unsafe extern "C" fn(arg1: *mut sqlite3_context) -> ::std::os::raw::c_int>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
pub unsafe fn sqlite3_aggregate_count(
|
||||
arg1: *mut sqlite3_context,
|
||||
) -> ::std::os::raw::c_int {
|
||||
let fun = __SQLITE3_AGGREGATE_COUNT
|
||||
.load(::atomic::Ordering::Acquire)
|
||||
.expect("SQLite API not initialized or SQLite feature omitted");
|
||||
(fun)(arg1)
|
||||
}
|
||||
|
||||
static __SQLITE3_BIND_BLOB: ::atomic::Atomic<
|
||||
Option<
|
||||
unsafe extern "C" fn(
|
||||
@ -3620,16 +3608,6 @@ pub unsafe fn sqlite3_exec(
|
||||
(fun)(arg1, arg2, arg3, arg4, arg5)
|
||||
}
|
||||
|
||||
static __SQLITE3_EXPIRED: ::atomic::Atomic<
|
||||
Option<unsafe extern "C" fn(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
pub unsafe fn sqlite3_expired(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int {
|
||||
let fun = __SQLITE3_EXPIRED
|
||||
.load(::atomic::Ordering::Acquire)
|
||||
.expect("SQLite API not initialized or SQLite feature omitted");
|
||||
(fun)(arg1)
|
||||
}
|
||||
|
||||
static __SQLITE3_FINALIZE: ::atomic::Atomic<
|
||||
Option<unsafe extern "C" fn(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
@ -3714,16 +3692,6 @@ pub unsafe fn sqlite3_get_table(
|
||||
(fun)(arg1, arg2, arg3, arg4, arg5, arg6)
|
||||
}
|
||||
|
||||
static __SQLITE3_GLOBAL_RECOVER: ::atomic::Atomic<
|
||||
Option<unsafe extern "C" fn() -> ::std::os::raw::c_int>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
pub unsafe fn sqlite3_global_recover() -> ::std::os::raw::c_int {
|
||||
let fun = __SQLITE3_GLOBAL_RECOVER
|
||||
.load(::atomic::Ordering::Acquire)
|
||||
.expect("SQLite API not initialized or SQLite feature omitted");
|
||||
(fun)()
|
||||
}
|
||||
|
||||
static __SQLITE3_INTERRUPT: ::atomic::Atomic<
|
||||
Option<unsafe extern "C" fn(arg1: *mut sqlite3)>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
@ -4292,16 +4260,6 @@ pub unsafe fn sqlite3_table_column_metadata(
|
||||
(fun)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
|
||||
}
|
||||
|
||||
static __SQLITE3_THREAD_CLEANUP: ::atomic::Atomic<Option<unsafe extern "C" fn()>> = ::atomic::Atomic::new(
|
||||
None,
|
||||
);
|
||||
pub unsafe fn sqlite3_thread_cleanup() {
|
||||
let fun = __SQLITE3_THREAD_CLEANUP
|
||||
.load(::atomic::Ordering::Acquire)
|
||||
.expect("SQLite API not initialized or SQLite feature omitted");
|
||||
(fun)()
|
||||
}
|
||||
|
||||
static __SQLITE3_TOTAL_CHANGES: ::atomic::Atomic<
|
||||
Option<unsafe extern "C" fn(arg1: *mut sqlite3) -> ::std::os::raw::c_int>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
@ -4342,24 +4300,6 @@ pub unsafe fn sqlite3_trace(
|
||||
(fun)(arg1, xTrace, arg2)
|
||||
}
|
||||
|
||||
static __SQLITE3_TRANSFER_BINDINGS: ::atomic::Atomic<
|
||||
Option<
|
||||
unsafe extern "C" fn(
|
||||
arg1: *mut sqlite3_stmt,
|
||||
arg2: *mut sqlite3_stmt,
|
||||
) -> ::std::os::raw::c_int,
|
||||
>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
pub unsafe fn sqlite3_transfer_bindings(
|
||||
arg1: *mut sqlite3_stmt,
|
||||
arg2: *mut sqlite3_stmt,
|
||||
) -> ::std::os::raw::c_int {
|
||||
let fun = __SQLITE3_TRANSFER_BINDINGS
|
||||
.load(::atomic::Ordering::Acquire)
|
||||
.expect("SQLite API not initialized or SQLite feature omitted");
|
||||
(fun)(arg1, arg2)
|
||||
}
|
||||
|
||||
static __SQLITE3_UPDATE_HOOK: ::atomic::Atomic<
|
||||
Option<
|
||||
unsafe extern "C" fn(
|
||||
@ -5800,28 +5740,6 @@ pub unsafe fn sqlite3_uri_parameter(
|
||||
(fun)(arg1, arg2)
|
||||
}
|
||||
|
||||
static __SQLITE3_URI_VSNPRINTF: ::atomic::Atomic<
|
||||
Option<
|
||||
unsafe extern "C" fn(
|
||||
arg1: ::std::os::raw::c_int,
|
||||
arg2: *mut ::std::os::raw::c_char,
|
||||
arg3: *const ::std::os::raw::c_char,
|
||||
arg4: *mut ::std::os::raw::c_void,
|
||||
) -> *mut ::std::os::raw::c_char,
|
||||
>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
pub unsafe fn sqlite3_uri_vsnprintf(
|
||||
arg1: ::std::os::raw::c_int,
|
||||
arg2: *mut ::std::os::raw::c_char,
|
||||
arg3: *const ::std::os::raw::c_char,
|
||||
arg4: *mut ::std::os::raw::c_void,
|
||||
) -> *mut ::std::os::raw::c_char {
|
||||
let fun = __SQLITE3_URI_VSNPRINTF
|
||||
.load(::atomic::Ordering::Acquire)
|
||||
.expect("SQLite API not initialized or SQLite feature omitted");
|
||||
(fun)(arg1, arg2, arg3, arg4)
|
||||
}
|
||||
|
||||
static __SQLITE3_WAL_CHECKPOINT_V2: ::atomic::Atomic<
|
||||
Option<
|
||||
unsafe extern "C" fn(
|
||||
@ -6281,8 +6199,6 @@ pub unsafe fn rusqlite_extension_init2(
|
||||
}
|
||||
__SQLITE3_AGGREGATE_CONTEXT
|
||||
.store((*p_api).aggregate_context, ::atomic::Ordering::Release);
|
||||
__SQLITE3_AGGREGATE_COUNT
|
||||
.store((*p_api).aggregate_count, ::atomic::Ordering::Release);
|
||||
__SQLITE3_BIND_BLOB.store((*p_api).bind_blob, ::atomic::Ordering::Release);
|
||||
__SQLITE3_BIND_DOUBLE.store((*p_api).bind_double, ::atomic::Ordering::Release);
|
||||
__SQLITE3_BIND_INT.store((*p_api).bind_int, ::atomic::Ordering::Release);
|
||||
@ -6355,14 +6271,12 @@ pub unsafe fn rusqlite_extension_init2(
|
||||
__SQLITE3_ERRMSG.store((*p_api).errmsg, ::atomic::Ordering::Release);
|
||||
__SQLITE3_ERRMSG16.store((*p_api).errmsg16, ::atomic::Ordering::Release);
|
||||
__SQLITE3_EXEC.store((*p_api).exec, ::atomic::Ordering::Release);
|
||||
__SQLITE3_EXPIRED.store((*p_api).expired, ::atomic::Ordering::Release);
|
||||
__SQLITE3_FINALIZE.store((*p_api).finalize, ::atomic::Ordering::Release);
|
||||
__SQLITE3_FREE.store((*p_api).free, ::atomic::Ordering::Release);
|
||||
__SQLITE3_FREE_TABLE.store((*p_api).free_table, ::atomic::Ordering::Release);
|
||||
__SQLITE3_GET_AUTOCOMMIT.store((*p_api).get_autocommit, ::atomic::Ordering::Release);
|
||||
__SQLITE3_GET_AUXDATA.store((*p_api).get_auxdata, ::atomic::Ordering::Release);
|
||||
__SQLITE3_GET_TABLE.store((*p_api).get_table, ::atomic::Ordering::Release);
|
||||
__SQLITE3_GLOBAL_RECOVER.store((*p_api).global_recover, ::atomic::Ordering::Release);
|
||||
__SQLITE3_INTERRUPT.store((*p_api).interruptx, ::atomic::Ordering::Release);
|
||||
__SQLITE3_LAST_INSERT_ROWID
|
||||
.store((*p_api).last_insert_rowid, ::atomic::Ordering::Release);
|
||||
@ -6398,11 +6312,8 @@ pub unsafe fn rusqlite_extension_init2(
|
||||
__SQLITE3_STEP.store((*p_api).step, ::atomic::Ordering::Release);
|
||||
__SQLITE3_TABLE_COLUMN_METADATA
|
||||
.store((*p_api).table_column_metadata, ::atomic::Ordering::Release);
|
||||
__SQLITE3_THREAD_CLEANUP.store((*p_api).thread_cleanup, ::atomic::Ordering::Release);
|
||||
__SQLITE3_TOTAL_CHANGES.store((*p_api).total_changes, ::atomic::Ordering::Release);
|
||||
__SQLITE3_TRACE.store((*p_api).trace, ::atomic::Ordering::Release);
|
||||
__SQLITE3_TRANSFER_BINDINGS
|
||||
.store((*p_api).transfer_bindings, ::atomic::Ordering::Release);
|
||||
__SQLITE3_UPDATE_HOOK.store((*p_api).update_hook, ::atomic::Ordering::Release);
|
||||
__SQLITE3_USER_DATA.store((*p_api).user_data, ::atomic::Ordering::Release);
|
||||
__SQLITE3_VALUE_BLOB.store((*p_api).value_blob, ::atomic::Ordering::Release);
|
||||
@ -6513,7 +6424,6 @@ pub unsafe fn rusqlite_extension_init2(
|
||||
__SQLITE3_URI_BOOLEAN.store((*p_api).uri_boolean, ::atomic::Ordering::Release);
|
||||
__SQLITE3_URI_INT64.store((*p_api).uri_int64, ::atomic::Ordering::Release);
|
||||
__SQLITE3_URI_PARAMETER.store((*p_api).uri_parameter, ::atomic::Ordering::Release);
|
||||
__SQLITE3_URI_VSNPRINTF.store((*p_api).vsnprintf, ::atomic::Ordering::Release);
|
||||
__SQLITE3_WAL_CHECKPOINT_V2
|
||||
.store((*p_api).wal_checkpoint_v2, ::atomic::Ordering::Release);
|
||||
__SQLITE3_AUTO_EXTENSION.store((*p_api).auto_extension, ::atomic::Ordering::Release);
|
||||
|
@ -711,6 +711,13 @@ mod loadable_extension {
|
||||
let name = ident.to_string();
|
||||
if name == "vmprintf" || name == "xvsnprintf" || name == "str_vappendf" {
|
||||
continue; // skip va_list
|
||||
} else if name == "aggregate_count"
|
||||
|| name == "expired"
|
||||
|| name == "global_recover"
|
||||
|| name == "thread_cleanup"
|
||||
|| name == "transfer_bindings"
|
||||
{
|
||||
continue; // omit deprecated
|
||||
}
|
||||
let sqlite3_name = match name.as_ref() {
|
||||
"xthreadsafe" => "sqlite3_threadsafe".to_owned(),
|
||||
|
@ -2890,18 +2890,6 @@ pub unsafe fn sqlite3_aggregate_context(
|
||||
(fun)(arg1, nBytes)
|
||||
}
|
||||
|
||||
static __SQLITE3_AGGREGATE_COUNT: ::atomic::Atomic<
|
||||
Option<unsafe extern "C" fn(arg1: *mut sqlite3_context) -> ::std::os::raw::c_int>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
pub unsafe fn sqlite3_aggregate_count(
|
||||
arg1: *mut sqlite3_context,
|
||||
) -> ::std::os::raw::c_int {
|
||||
let fun = __SQLITE3_AGGREGATE_COUNT
|
||||
.load(::atomic::Ordering::Acquire)
|
||||
.expect("SQLite API not initialized or SQLite feature omitted");
|
||||
(fun)(arg1)
|
||||
}
|
||||
|
||||
static __SQLITE3_BIND_BLOB: ::atomic::Atomic<
|
||||
Option<
|
||||
unsafe extern "C" fn(
|
||||
@ -4001,16 +3989,6 @@ pub unsafe fn sqlite3_exec(
|
||||
(fun)(arg1, arg2, arg3, arg4, arg5)
|
||||
}
|
||||
|
||||
static __SQLITE3_EXPIRED: ::atomic::Atomic<
|
||||
Option<unsafe extern "C" fn(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
pub unsafe fn sqlite3_expired(arg1: *mut sqlite3_stmt) -> ::std::os::raw::c_int {
|
||||
let fun = __SQLITE3_EXPIRED
|
||||
.load(::atomic::Ordering::Acquire)
|
||||
.expect("SQLite API not initialized or SQLite feature omitted");
|
||||
(fun)(arg1)
|
||||
}
|
||||
|
||||
static __SQLITE3_FINALIZE: ::atomic::Atomic<
|
||||
Option<unsafe extern "C" fn(pStmt: *mut sqlite3_stmt) -> ::std::os::raw::c_int>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
@ -4095,16 +4073,6 @@ pub unsafe fn sqlite3_get_table(
|
||||
(fun)(arg1, arg2, arg3, arg4, arg5, arg6)
|
||||
}
|
||||
|
||||
static __SQLITE3_GLOBAL_RECOVER: ::atomic::Atomic<
|
||||
Option<unsafe extern "C" fn() -> ::std::os::raw::c_int>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
pub unsafe fn sqlite3_global_recover() -> ::std::os::raw::c_int {
|
||||
let fun = __SQLITE3_GLOBAL_RECOVER
|
||||
.load(::atomic::Ordering::Acquire)
|
||||
.expect("SQLite API not initialized or SQLite feature omitted");
|
||||
(fun)()
|
||||
}
|
||||
|
||||
static __SQLITE3_INTERRUPT: ::atomic::Atomic<
|
||||
Option<unsafe extern "C" fn(arg1: *mut sqlite3)>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
@ -4673,16 +4641,6 @@ pub unsafe fn sqlite3_table_column_metadata(
|
||||
(fun)(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
|
||||
}
|
||||
|
||||
static __SQLITE3_THREAD_CLEANUP: ::atomic::Atomic<Option<unsafe extern "C" fn()>> = ::atomic::Atomic::new(
|
||||
None,
|
||||
);
|
||||
pub unsafe fn sqlite3_thread_cleanup() {
|
||||
let fun = __SQLITE3_THREAD_CLEANUP
|
||||
.load(::atomic::Ordering::Acquire)
|
||||
.expect("SQLite API not initialized or SQLite feature omitted");
|
||||
(fun)()
|
||||
}
|
||||
|
||||
static __SQLITE3_TOTAL_CHANGES: ::atomic::Atomic<
|
||||
Option<unsafe extern "C" fn(arg1: *mut sqlite3) -> ::std::os::raw::c_int>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
@ -4723,24 +4681,6 @@ pub unsafe fn sqlite3_trace(
|
||||
(fun)(arg1, xTrace, arg2)
|
||||
}
|
||||
|
||||
static __SQLITE3_TRANSFER_BINDINGS: ::atomic::Atomic<
|
||||
Option<
|
||||
unsafe extern "C" fn(
|
||||
arg1: *mut sqlite3_stmt,
|
||||
arg2: *mut sqlite3_stmt,
|
||||
) -> ::std::os::raw::c_int,
|
||||
>,
|
||||
> = ::atomic::Atomic::new(None);
|
||||
pub unsafe fn sqlite3_transfer_bindings(
|
||||
arg1: *mut sqlite3_stmt,
|
||||
arg2: *mut sqlite3_stmt,
|
||||
) -> ::std::os::raw::c_int {
|
||||
let fun = __SQLITE3_TRANSFER_BINDINGS
|
||||
.load(::atomic::Ordering::Acquire)
|
||||
.expect("SQLite API not initialized or SQLite feature omitted");
|
||||
(fun)(arg1, arg2)
|
||||
}
|
||||
|
||||
static __SQLITE3_UPDATE_HOOK: ::atomic::Atomic<
|
||||
Option<
|
||||
unsafe extern "C" fn(
|
||||
@ -7477,8 +7417,6 @@ pub unsafe fn rusqlite_extension_init2(
|
||||
}
|
||||
__SQLITE3_AGGREGATE_CONTEXT
|
||||
.store((*p_api).aggregate_context, ::atomic::Ordering::Release);
|
||||
__SQLITE3_AGGREGATE_COUNT
|
||||
.store((*p_api).aggregate_count, ::atomic::Ordering::Release);
|
||||
__SQLITE3_BIND_BLOB.store((*p_api).bind_blob, ::atomic::Ordering::Release);
|
||||
__SQLITE3_BIND_DOUBLE.store((*p_api).bind_double, ::atomic::Ordering::Release);
|
||||
__SQLITE3_BIND_INT.store((*p_api).bind_int, ::atomic::Ordering::Release);
|
||||
@ -7551,14 +7489,12 @@ pub unsafe fn rusqlite_extension_init2(
|
||||
__SQLITE3_ERRMSG.store((*p_api).errmsg, ::atomic::Ordering::Release);
|
||||
__SQLITE3_ERRMSG16.store((*p_api).errmsg16, ::atomic::Ordering::Release);
|
||||
__SQLITE3_EXEC.store((*p_api).exec, ::atomic::Ordering::Release);
|
||||
__SQLITE3_EXPIRED.store((*p_api).expired, ::atomic::Ordering::Release);
|
||||
__SQLITE3_FINALIZE.store((*p_api).finalize, ::atomic::Ordering::Release);
|
||||
__SQLITE3_FREE.store((*p_api).free, ::atomic::Ordering::Release);
|
||||
__SQLITE3_FREE_TABLE.store((*p_api).free_table, ::atomic::Ordering::Release);
|
||||
__SQLITE3_GET_AUTOCOMMIT.store((*p_api).get_autocommit, ::atomic::Ordering::Release);
|
||||
__SQLITE3_GET_AUXDATA.store((*p_api).get_auxdata, ::atomic::Ordering::Release);
|
||||
__SQLITE3_GET_TABLE.store((*p_api).get_table, ::atomic::Ordering::Release);
|
||||
__SQLITE3_GLOBAL_RECOVER.store((*p_api).global_recover, ::atomic::Ordering::Release);
|
||||
__SQLITE3_INTERRUPT.store((*p_api).interruptx, ::atomic::Ordering::Release);
|
||||
__SQLITE3_LAST_INSERT_ROWID
|
||||
.store((*p_api).last_insert_rowid, ::atomic::Ordering::Release);
|
||||
@ -7594,11 +7530,8 @@ pub unsafe fn rusqlite_extension_init2(
|
||||
__SQLITE3_STEP.store((*p_api).step, ::atomic::Ordering::Release);
|
||||
__SQLITE3_TABLE_COLUMN_METADATA
|
||||
.store((*p_api).table_column_metadata, ::atomic::Ordering::Release);
|
||||
__SQLITE3_THREAD_CLEANUP.store((*p_api).thread_cleanup, ::atomic::Ordering::Release);
|
||||
__SQLITE3_TOTAL_CHANGES.store((*p_api).total_changes, ::atomic::Ordering::Release);
|
||||
__SQLITE3_TRACE.store((*p_api).trace, ::atomic::Ordering::Release);
|
||||
__SQLITE3_TRANSFER_BINDINGS
|
||||
.store((*p_api).transfer_bindings, ::atomic::Ordering::Release);
|
||||
__SQLITE3_UPDATE_HOOK.store((*p_api).update_hook, ::atomic::Ordering::Release);
|
||||
__SQLITE3_USER_DATA.store((*p_api).user_data, ::atomic::Ordering::Release);
|
||||
__SQLITE3_VALUE_BLOB.store((*p_api).value_blob, ::atomic::Ordering::Release);
|
||||
|
Loading…
Reference in New Issue
Block a user