File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -1869,7 +1869,7 @@ impl Default for BindgenOptions {
1869
1869
time_phases : false ,
1870
1870
record_matches : true ,
1871
1871
rustfmt_bindings : true ,
1872
- size_t_is_usize : false ,
1872
+ size_t_is_usize : true ,
1873
1873
rustfmt_configuration_file : None ,
1874
1874
no_partialeq_types : Default :: default ( ) ,
1875
1875
no_copy_types : Default :: default ( ) ,
Original file line number Diff line number Diff line change @@ -408,7 +408,10 @@ where
408
408
) ,
409
409
Arg :: with_name ( "size_t-is-usize" )
410
410
. long ( "size_t-is-usize" )
411
- . help ( "Translate size_t to usize." ) ,
411
+ . help ( "Translate size_t to usize. (this is the default)" ) ,
412
+ Arg :: with_name ( "size_t-is-not-usize" )
413
+ . long ( "size_t-is-not-usize" )
414
+ . help ( "Translate size_t to platform-specific lengths." ) ,
412
415
Arg :: with_name ( "no-rustfmt-bindings" )
413
416
. long ( "no-rustfmt-bindings" )
414
417
. help ( "Do not format the generated bindings with rustfmt." ) ,
@@ -815,6 +818,16 @@ where
815
818
816
819
if matches. is_present ( "size_t-is-usize" ) {
817
820
builder = builder. size_t_is_usize ( true ) ;
821
+ if matches. is_present ( "size_t-is-not-usize" ) {
822
+ return Err ( Error :: new (
823
+ ErrorKind :: Other ,
824
+ "Cannot supply both --size_t-is-usize and --size_t-is-not-usize" ,
825
+ ) ) ;
826
+ }
827
+ }
828
+
829
+ if matches. is_present ( "size_t-is-not-usize" ) {
830
+ builder = builder. size_t_is_usize ( false ) ;
818
831
}
819
832
820
833
let no_rustfmt_bindings = matches. is_present ( "no-rustfmt-bindings" ) ;
You can’t perform that action at this time.
0 commit comments