From 2275f8157ff384fa6c59eeff481b5dfbee425214 Mon Sep 17 00:00:00 2001 From: Ivan Ukhov Date: Sat, 1 Aug 2015 13:55:22 -0400 Subject: [PATCH] Update sqlite3-sys --- Cargo.toml | 6 ++---- build.rs | 9 +++++++++ src/connection.rs | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 build.rs diff --git a/Cargo.toml b/Cargo.toml index c5d3307..b933ba9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,13 +7,11 @@ repository = "https://github.com/stainless-steel/sqlite" homepage = "https://github.com/stainless-steel/sqlite" documentation = "https://stainless-steel.github.io/sqlite" description = "The package provides an interface to SQLite." - -[features] -edge = ["sqlite3-sys/edge"] +build = "build.rs" [dependencies] libc = "*" -sqlite3-sys = "*" +sqlite3-sys = "0.6" [dev-dependencies] temporary = "*" diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..e858925 --- /dev/null +++ b/build.rs @@ -0,0 +1,9 @@ +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); + } + } +} diff --git a/src/connection.rs b/src/connection.rs index 114c2bc..c7051cc 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -100,7 +100,7 @@ impl<'l> Connection<'l> { } impl<'l> Drop for Connection<'l> { - #[cfg(not(feature = "edge"))] + #[cfg(not(feature = "sqlite3-close-v2"))] #[inline] #[allow(unused_must_use)] fn drop(&mut self) { @@ -108,7 +108,7 @@ impl<'l> Drop for Connection<'l> { unsafe { ffi::sqlite3_close(self.raw) }; } - #[cfg(feature = "edge")] + #[cfg(feature = "sqlite3-close-v2")] #[inline] #[allow(unused_must_use)] fn drop(&mut self) {