summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorth0rex <omit2912@web.de>2017-02-27 18:24:50 +0100
committerth0rex <omit2912@web.de>2017-02-27 18:24:50 +0100
commitc0d5f706e07234039ac98c7254b02d0f1dac6f05 (patch)
tree0d8c9f2a54acbd8bc6be35b12f51f5e71bd884e2
parent1bf453cdc5fb278a0c840986a6723ad9c01f5ef3 (diff)
Add command line flag for prepend_enum_name
-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);
}