diff options
Diffstat (limited to 'libbindgen/src/ir/context.rs')
-rw-r--r-- | libbindgen/src/ir/context.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbindgen/src/ir/context.rs b/libbindgen/src/ir/context.rs index e3dc3384..2d877920 100644 --- a/libbindgen/src/ir/context.rs +++ b/libbindgen/src/ir/context.rs @@ -2,6 +2,7 @@ use BindgenOptions; use cexpr; +use chooser::TypeChooser; use clang::{self, Cursor}; use parse::ClangItemParser; use std::borrow::Cow; @@ -184,6 +185,11 @@ impl<'ctx> BindgenContext<'ctx> { me } + /// Get the user-provided type chooser by reference, if any. + pub fn type_chooser(&self) -> Option<&TypeChooser> { + self.options().type_chooser.as_ref().map(|t| &**t) + } + /// Define a new item. /// /// This inserts it into the internal items set, and its type into the |