mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-04-01 22:11:07 +00:00
Eliminate the build script
This commit is contained in:
parent
a157cf36b2
commit
b4cd56521d
@ -11,7 +11,6 @@ repository = "https://github.com/stainless-steel/sqlite"
|
|||||||
homepage = "https://github.com/stainless-steel/sqlite"
|
homepage = "https://github.com/stainless-steel/sqlite"
|
||||||
documentation = "https://stainless-steel.github.io/sqlite"
|
documentation = "https://stainless-steel.github.io/sqlite"
|
||||||
description = "The package provides an interface to SQLite."
|
description = "The package provides an interface to SQLite."
|
||||||
build = "build.rs"
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
|
9
build.rs
9
build.rs
@ -1,9 +0,0 @@
|
|||||||
use std::env;
|
|
||||||
|
|
||||||
fn main() {
|
|
||||||
if let Ok(features) = env::var("DEP_SQLITE3_FEATURES") {
|
|
||||||
for feature in features.split(' ') {
|
|
||||||
println!(r#"cargo:rustc-cfg=feature="{}""#, feature);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -96,21 +96,12 @@ impl Connection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Drop for Connection {
|
impl Drop for Connection {
|
||||||
#[cfg(not(feature = "sqlite3-close-v2"))]
|
|
||||||
#[inline]
|
#[inline]
|
||||||
#[allow(unused_must_use)]
|
#[allow(unused_must_use)]
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
self.remove_busy_handler();
|
self.remove_busy_handler();
|
||||||
unsafe { ffi::sqlite3_close(self.raw) };
|
unsafe { ffi::sqlite3_close(self.raw) };
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "sqlite3-close-v2")]
|
|
||||||
#[inline]
|
|
||||||
#[allow(unused_must_use)]
|
|
||||||
fn drop(&mut self) {
|
|
||||||
self.remove_busy_handler();
|
|
||||||
unsafe { ffi::sqlite3_close_v2(self.raw) };
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern fn busy_callback<F>(callback: *mut c_void, attempts: c_int) -> c_int
|
extern fn busy_callback<F>(callback: *mut c_void, attempts: c_int) -> c_int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user