mirror of
https://github.com/isar/rusqlite.git
synced 2025-10-21 15:58:54 +08:00
Merge branch 'master' into semver-check
This commit is contained in:
13
src/lib.rs
13
src/lib.rs
@@ -52,7 +52,6 @@
|
||||
//! ```
|
||||
#![allow(unknown_lints)]
|
||||
|
||||
extern crate libc;
|
||||
extern crate libsqlite3_sys as ffi;
|
||||
extern crate lru_cache;
|
||||
#[macro_use]
|
||||
@@ -74,7 +73,7 @@ use std::result;
|
||||
use std::str;
|
||||
use std::sync::{Once, ONCE_INIT};
|
||||
use std::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering};
|
||||
use libc::{c_int, c_char, c_void};
|
||||
use std::os::raw::{c_int, c_char, c_void};
|
||||
|
||||
use types::{ToSql, ToSqlOutput, FromSql, FromSqlError, ValueRef};
|
||||
use error::{error_from_sqlite_code, error_from_handle};
|
||||
@@ -208,7 +207,7 @@ impl Connection {
|
||||
|
||||
/// Open a new connection to a SQLite database.
|
||||
///
|
||||
/// Database Connection](http://www.sqlite.org/c3ref/open.html) for a description of valid
|
||||
/// [Database Connection](http://www.sqlite.org/c3ref/open.html) for a description of valid
|
||||
/// flag combinations.
|
||||
///
|
||||
/// # Failure
|
||||
@@ -228,7 +227,7 @@ impl Connection {
|
||||
|
||||
/// Open a new connection to an in-memory SQLite database.
|
||||
///
|
||||
/// Database Connection](http://www.sqlite.org/c3ref/open.html) for a description of valid
|
||||
/// [Database Connection](http://www.sqlite.org/c3ref/open.html) for a description of valid
|
||||
/// flag combinations.
|
||||
///
|
||||
/// # Failure
|
||||
@@ -534,7 +533,7 @@ bitflags! {
|
||||
#[doc = "Flags for opening SQLite database connections."]
|
||||
#[doc = "See [sqlite3_open_v2](http://www.sqlite.org/c3ref/open.html) for details."]
|
||||
#[repr(C)]
|
||||
pub flags OpenFlags: ::libc::c_int {
|
||||
pub flags OpenFlags: ::std::os::raw::c_int {
|
||||
const SQLITE_OPEN_READ_ONLY = 0x00000001,
|
||||
const SQLITE_OPEN_READ_WRITE = 0x00000002,
|
||||
const SQLITE_OPEN_CREATE = 0x00000004,
|
||||
@@ -778,7 +777,7 @@ impl InnerConnection {
|
||||
Ok(())
|
||||
} else {
|
||||
let message = errmsg_to_string(&*errmsg);
|
||||
ffi::sqlite3_free(errmsg as *mut libc::c_void);
|
||||
ffi::sqlite3_free(errmsg as *mut ::std::os::raw::c_void);
|
||||
Err(error_from_sqlite_code(r, Some(message)))
|
||||
}
|
||||
}
|
||||
@@ -1393,7 +1392,7 @@ mod test {
|
||||
let raw_stmt = {
|
||||
use std::mem;
|
||||
use std::ptr;
|
||||
use libc::c_int;
|
||||
use std::os::raw::c_int;
|
||||
use super::str_to_cstring;
|
||||
|
||||
let raw_db = db.db.borrow_mut().db;
|
||||
|
Reference in New Issue
Block a user