diff options
Diffstat (limited to 'libbindgen/src/chooser.rs')
-rw-r--r-- | libbindgen/src/chooser.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libbindgen/src/chooser.rs b/libbindgen/src/chooser.rs new file mode 100644 index 00000000..10a77dc9 --- /dev/null +++ b/libbindgen/src/chooser.rs @@ -0,0 +1,14 @@ +//! A public API for more fine-grained customization of bindgen behavior. + +pub use ir::int::IntKind; +use std::fmt; + +/// A trait to allow configuring different kinds of types in different +/// situations. +pub trait TypeChooser: fmt::Debug { + /// The integer kind an integer macro should have, given a name and the + /// value of that macro, or `None` if you want the default to be chosen. + fn int_macro(&self, _name: &str, _value: i64) -> Option<IntKind> { + None + } +} |