Merge pull request #137 from jgallagher/fix-nightly-crash

Fix crash due to 0-sized function type change in nightly
This commit is contained in:
John Gallagher 2016-03-29 16:32:23 -04:00
commit d6e604af77
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# Version UPCOMING (...)
* Fixes crash on nightly Rust when using the `trace` feature.
* Adds optional `clippy` feature and addresses issues it found.
* Adds `column_count()` method to `Statement` and `Row`.
* Adds `types::Value` for dynamic column types.

View File

@ -35,7 +35,9 @@ pub unsafe fn config_log(callback: Option<fn(c_int, &str)>) -> Result<()> {
let rc = match callback {
Some(f) => {
let p_arg: *mut c_void = mem::transmute(f);
ffi::sqlite3_config(ffi::SQLITE_CONFIG_LOG, Some(log_callback), p_arg)
ffi::sqlite3_config(ffi::SQLITE_CONFIG_LOG,
log_callback as extern "C" fn(_, _, _),
p_arg)
}
None => {
let nullptr: *mut c_void = ptr::null_mut();