mirror of
				https://github.com/isar/rusqlite.git
				synced 2025-10-31 05:48:56 +08:00 
			
		
		
		
	Make VTab / VTabCursor unsafe trait as implmenting them on the wrong type is unsound
				
					
				
			This commit is contained in:
		
				
					committed by
					
						 Thom Chiovoloni
						Thom Chiovoloni
					
				
			
			
				
	
			
			
			
						parent
						
							3c6b57fe1b
						
					
				
				
					commit
					c9ef5bd63c
				
			| @@ -71,7 +71,7 @@ struct ArrayTab { | ||||
|     base: ffi::sqlite3_vtab, | ||||
| } | ||||
|  | ||||
| impl VTab for ArrayTab { | ||||
| unsafe impl VTab for ArrayTab { | ||||
|     type Aux = (); | ||||
|     type Cursor = ArrayTabCursor; | ||||
|  | ||||
| @@ -149,7 +149,7 @@ impl ArrayTabCursor { | ||||
|         } | ||||
|     } | ||||
| } | ||||
| impl VTabCursor for ArrayTabCursor { | ||||
| unsafe impl VTabCursor for ArrayTabCursor { | ||||
|     fn filter(&mut self, idx_num: c_int, _idx_str: Option<&str>, args: &Values<'_>) -> Result<()> { | ||||
|         if idx_num > 0 { | ||||
|             self.ptr = args.get_array(0)?; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user