@@ -116,7 +116,7 @@ pub fn integer_type(
116
116
pub fn bitfield_unit ( ctx : & BindgenContext , layout : Layout ) -> TokenStream {
117
117
let mut tokens = quote ! { } ;
118
118
119
- if ctx. options ( ) . enable_cxx_namespaces {
119
+ if ctx. inputs ( ) . enable_cxx_namespaces {
120
120
tokens. append_all ( quote ! { root:: } ) ;
121
121
}
122
122
@@ -138,16 +138,16 @@ pub mod ast_ty {
138
138
139
139
pub fn c_void ( ctx : & BindgenContext ) -> TokenStream {
140
140
// ctypes_prefix takes precedence
141
- match ctx. options ( ) . ctypes_prefix {
141
+ match ctx. inputs ( ) . ctypes_prefix {
142
142
Some ( ref prefix) => {
143
143
let prefix = TokenStream :: from_str ( prefix. as_str ( ) ) . unwrap ( ) ;
144
144
quote ! {
145
145
#prefix:: c_void
146
146
}
147
147
}
148
148
None => {
149
- if ctx. options ( ) . use_core &&
150
- ctx. options ( ) . rust_features . core_ffi_c_void
149
+ if ctx. inputs ( ) . use_core &&
150
+ ctx. inputs ( ) . rust_features ( ) . core_ffi_c_void
151
151
{
152
152
quote ! { :: core:: ffi:: c_void }
153
153
} else {
@@ -159,16 +159,16 @@ pub mod ast_ty {
159
159
160
160
pub fn raw_type ( ctx : & BindgenContext , name : & str ) -> TokenStream {
161
161
let ident = ctx. rust_ident_raw ( name) ;
162
- match ctx. options ( ) . ctypes_prefix {
162
+ match ctx. inputs ( ) . ctypes_prefix {
163
163
Some ( ref prefix) => {
164
164
let prefix = TokenStream :: from_str ( prefix. as_str ( ) ) . unwrap ( ) ;
165
165
quote ! {
166
166
#prefix:: #ident
167
167
}
168
168
}
169
169
None => {
170
- if ctx. options ( ) . use_core &&
171
- ctx. options ( ) . rust_features ( ) . core_ffi_c
170
+ if ctx. inputs ( ) . use_core &&
171
+ ctx. inputs ( ) . rust_features ( ) . core_ffi_c
172
172
{
173
173
quote ! {
174
174
:: core:: ffi:: #ident
@@ -191,7 +191,7 @@ pub mod ast_ty {
191
191
// often?
192
192
//
193
193
// Also, maybe this one shouldn't be the default?
194
- match ( fk, ctx. options ( ) . convert_floats ) {
194
+ match ( fk, ctx. inputs ( ) . convert_floats ) {
195
195
( FloatKind :: Float , true ) => quote ! { f32 } ,
196
196
( FloatKind :: Double , true ) => quote ! { f64 } ,
197
197
( FloatKind :: Float , false ) => raw_type ( ctx, "c_float" ) ,
@@ -218,7 +218,7 @@ pub mod ast_ty {
218
218
}
219
219
}
220
220
( FloatKind :: Float128 , _) => {
221
- if ctx. options ( ) . rust_features . i128_and_u128 {
221
+ if ctx. inputs ( ) . rust_features ( ) . i128_and_u128 {
222
222
quote ! { u128 }
223
223
} else {
224
224
quote ! { [ u64 ; 2 ] }
0 commit comments