Fix crash due to 0-sized function type change in nightly

This commit is contained in:
John Gallagher 2016-03-29 16:09:49 -04:00
parent 4a8a44d3d5
commit c0b8be99e8

View File

@ -35,7 +35,9 @@ pub unsafe fn config_log(callback: Option<fn(c_int, &str)>) -> Result<()> {
let rc = match callback { let rc = match callback {
Some(f) => { Some(f) => {
let p_arg: *mut c_void = mem::transmute(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 => { None => {
let nullptr: *mut c_void = ptr::null_mut(); let nullptr: *mut c_void = ptr::null_mut();