Make connect/create/declare_vtab safe

This commit is contained in:
gwenn
2018-06-20 20:21:26 +02:00
parent afeb5d4d47
commit eaee342025
4 changed files with 10 additions and 18 deletions

View File

@@ -84,7 +84,7 @@ impl Module for CSVModule {
self.0
}
unsafe fn connect(db: *mut ffi::sqlite3, _aux: Option<&()>, args: &[&[u8]]) -> Result<CSVTab> {
fn connect(db: &mut ffi::sqlite3, _aux: Option<&()>, args: &[&[u8]]) -> Result<CSVTab> {
if args.len() < 4 {
return Err(Error::ModuleError("no CSV file specified".to_owned()));
}