summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index e92be92b..433198b0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -415,6 +415,16 @@ impl Builder {
self
}
+ /// Whether inline functions should be generated or not.
+ ///
+ /// Note that they will usually not work. However you can use
+ /// `-fkeep-inline-functions` or `-fno-inline-functions` if you are
+ /// responsible of compiling the library to make them callable.
+ pub fn generate_inline_functions(mut self, doit: bool) -> Self {
+ self.options.generate_inline_functions = doit;
+ self
+ }
+
/// Ignore functions.
pub fn ignore_functions(mut self) -> Builder {
self.options.codegen_config.functions = false;
@@ -584,6 +594,9 @@ pub struct BindgenOptions {
/// documentation for more details.
pub generate_comments: bool,
+ /// Whether to generate inline functions. Defaults to false.
+ pub generate_inline_functions: bool,
+
/// Wether to whitelist types recursively. Defaults to true.
pub whitelist_recursively: bool,
@@ -654,6 +667,7 @@ impl Default for BindgenOptions {
codegen_config: CodegenConfig::all(),
conservative_inline_namespaces: false,
generate_comments: true,
+ generate_inline_functions: false,
whitelist_recursively: true,
objc_extern_crate: false,
enable_mangling: true,