File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
extern crate bindgen;
2
2
extern crate cc;
3
3
4
- use bindgen:: callbacks:: { MacroParsingBehavior , ParseCallbacks } ;
4
+ use bindgen:: callbacks:: { MacroParsingBehavior , ParseCallbacks , IntKind } ;
5
5
use bindgen:: Builder ;
6
6
use std:: collections:: HashSet ;
7
7
use std:: env;
@@ -59,6 +59,13 @@ impl ParseCallbacks for MacroCallback {
59
59
_ => { }
60
60
}
61
61
}
62
+
63
+ fn int_macro ( & self , _name : & str , _value : i64 ) -> Option < IntKind > {
64
+ Some ( IntKind :: Custom {
65
+ name : "crate::MacroInteger" ,
66
+ is_signed : true ,
67
+ } )
68
+ }
62
69
}
63
70
64
71
impl Drop for MacroCallback {
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ use std::os::raw::c_int;
11
11
#[ allow( unused) ]
12
12
use bindings:: testing:: Bar ; // This type is generated from module_raw_line.
13
13
14
+ type MacroInteger = isize ;
15
+
14
16
#[ test]
15
17
fn test_static_array ( ) {
16
18
let mut test = unsafe { bindings:: Test_COUNTDOWN . as_ptr ( ) } ;
You can’t perform that action at this time.
0 commit comments