summaryrefslogtreecommitdiff
path: root/libbindgen/src
diff options
context:
space:
mode:
Diffstat (limited to 'libbindgen/src')
-rw-r--r--libbindgen/src/chooser.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/libbindgen/src/chooser.rs b/libbindgen/src/chooser.rs
index 10a77dc9..f28b32f1 100644
--- a/libbindgen/src/chooser.rs
+++ b/libbindgen/src/chooser.rs
@@ -1,6 +1,7 @@
//! A public API for more fine-grained customization of bindgen behavior.
pub use ir::int::IntKind;
+pub use ir::enum_ty::EnumVariantValue;
use std::fmt;
/// A trait to allow configuring different kinds of types in different
@@ -11,4 +12,14 @@ pub trait TypeChooser: fmt::Debug {
fn int_macro(&self, _name: &str, _value: i64) -> Option<IntKind> {
None
}
+
+ /// This function should return whether, given the a given enum variant
+ /// name, and value, returns whether this enum variant will forcibly be a
+ /// constant.
+ fn constify_enum_variant(&self,
+ _enum_name: Option<&str>,
+ _variant_name: &str,
+ _variant_value: Option<EnumVariantValue>) -> bool {
+ false
+ }
}