mirror of
https://github.com/isar/rusqlite.git
synced 2025-04-10 01:07:45 +08:00
minor changes to match other hooks
This commit is contained in:
parent
0d56555875
commit
41cf19030a
@ -195,15 +195,15 @@ impl InnerConnection {
|
|||||||
Action::UNKNOWN => PreUpdateCase::Unknown,
|
Action::UNKNOWN => PreUpdateCase::Unknown,
|
||||||
};
|
};
|
||||||
|
|
||||||
let _ = catch_unwind(|| {
|
drop(catch_unwind(|| {
|
||||||
let boxed_hook: *mut F = p_arg as *mut F;
|
let boxed_hook: *mut F = p_arg.cast<F>();
|
||||||
(*boxed_hook)(
|
(*boxed_hook)(
|
||||||
action,
|
action,
|
||||||
expect_utf8(db_name, "database name"),
|
expect_utf8(db_name, "database name"),
|
||||||
expect_utf8(tbl_name, "table name"),
|
expect_utf8(tbl_name, "table name"),
|
||||||
&preupdate_case,
|
&preupdate_case,
|
||||||
);
|
);
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
let free_preupdate_hook = if hook.is_some() {
|
let free_preupdate_hook = if hook.is_some() {
|
||||||
@ -219,7 +219,7 @@ impl InnerConnection {
|
|||||||
ffi::sqlite3_preupdate_hook(
|
ffi::sqlite3_preupdate_hook(
|
||||||
self.db(),
|
self.db(),
|
||||||
Some(call_boxed_closure::<F>),
|
Some(call_boxed_closure::<F>),
|
||||||
boxed_hook as *mut _,
|
boxed_hook.cast(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user