summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/options.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/options.rs b/src/options.rs
index a62aa73d..78a0e30b 100644
--- a/src/options.rs
+++ b/src/options.rs
@@ -127,6 +127,9 @@ pub fn builder_from_flags<I>
Arg::with_name("no-convert-floats")
.long("no-convert-floats")
.help("Don't automatically convert floats to f32/f64."),
+ Arg::with_name("no-prepend-enum-name")
+ .long("no-prepend-enum-name")
+ .help("Do not prepend the enum name to bitfield or constant variants"),
Arg::with_name("no-unstable-rust")
.long("no-unstable-rust")
.help("Do not generate unstable Rust code.")
@@ -239,6 +242,10 @@ pub fn builder_from_flags<I>
builder = builder.derive_default(false);
}
+ if matches.is_present("no-prepend-enum-name") {
+ builder = builder.prepend_enum_name(false);
+ }
+
if let Some(prefix) = matches.value_of("ctypes-prefix") {
builder = builder.ctypes_prefix(prefix);
}