From b743ab0d5fa222c8d4e7a59a7d3952d042eb2e5d Mon Sep 17 00:00:00 2001 From: Emilio Cobos Álvarez Date: Wed, 18 Jan 2017 14:40:49 +0100 Subject: codegen: Don't implement variadic methods. Fixes #402 --- libbindgen/src/codegen/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libbindgen/src/codegen/mod.rs') 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); -- cgit v1.2.3