diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-01-18 14:40:49 +0100 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-01-18 14:42:27 +0100 |
commit | b743ab0d5fa222c8d4e7a59a7d3952d042eb2e5d (patch) | |
tree | f93f403cad4df8c08263e23c243723870c0ed4e4 /libbindgen/src/codegen/mod.rs | |
parent | f103d8a66d4c736f97d7e98c3698b5542e38d28c (diff) |
codegen: Don't implement variadic methods.
Fixes #402
Diffstat (limited to 'libbindgen/src/codegen/mod.rs')
-rw-r--r-- | libbindgen/src/codegen/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbindgen/src/codegen/mod.rs b/libbindgen/src/codegen/mod.rs index f8352cc8..38cf6958 100644 --- a/libbindgen/src/codegen/mod.rs +++ b/libbindgen/src/codegen/mod.rs @@ -1295,6 +1295,12 @@ impl MethodCodegen for Method { _ => panic!("How in the world?"), }; + // Do not generate variadic methods, since rust does not allow + // implementing them, and we don't do a good job at it anyway. + if signature.is_variadic() { + return; + } + let count = { let mut count = method_names.entry(name.clone()) .or_insert(0); |