mirror of
				https://github.com/isar/rusqlite.git
				synced 2025-10-31 22:08:55 +08:00 
			
		
		
		
	TypeChooser has been renamed to ParseCallbacks
This commit is contained in:
		| @@ -139,7 +139,7 @@ mod build { | ||||
|     mod bindings { | ||||
|         extern crate bindgen; | ||||
|  | ||||
|         use self::bindgen::chooser::{TypeChooser, IntKind}; | ||||
|         use self::bindgen::callbacks::{ParseCallbacks, IntKind}; | ||||
|         use super::HeaderLocation; | ||||
|  | ||||
|         use std::env; | ||||
| @@ -150,7 +150,7 @@ mod build { | ||||
|         #[derive(Debug)] | ||||
|         struct SqliteTypeChooser; | ||||
|  | ||||
|         impl TypeChooser for SqliteTypeChooser { | ||||
|         impl ParseCallbacks for SqliteTypeChooser { | ||||
|             fn int_macro(&self, _name: &str, value: i64) -> Option<IntKind> { | ||||
|                 if value >= i32::min_value() as i64 && value <= i32::max_value() as i64 { | ||||
|                     Some(IntKind::I32) | ||||
| @@ -166,7 +166,7 @@ mod build { | ||||
|             let mut output = Vec::new(); | ||||
|             bindgen::builder() | ||||
|                 .header(header.clone()) | ||||
|                 .type_chooser(Box::new(SqliteTypeChooser)) | ||||
|                 .parse_callbacks(Box::new(SqliteTypeChooser)) | ||||
|                 .generate() | ||||
|                 .expect(&format!("could not run bindgen on header {}", header)) | ||||
|                 .write(Box::new(&mut output)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user