diff --git a/src/bindgen/ir/ty.rs b/src/bindgen/ir/ty.rs index 5c68e4ca1..63938b26d 100644 --- a/src/bindgen/ir/ty.rs +++ b/src/bindgen/ir/ty.rs @@ -538,6 +538,9 @@ impl Type { } return Err("Tuples are not supported types.".to_owned()); } + syn::Type::Verbatim(ref tokens) if tokens.to_string() == "..." => { + Type::Primitive(PrimitiveType::VaList) + } _ => return Err(format!("Unsupported type: {:?}", ty)), }; diff --git a/tests/expectations/va_list.c b/tests/expectations/va_list.c index 2332c27fa..d2f9ac39e 100644 --- a/tests/expectations/va_list.c +++ b/tests/expectations/va_list.c @@ -4,3 +4,5 @@ #include int32_t va_list_test(va_list ap); + +int32_t va_list_test2(va_list ap); diff --git a/tests/expectations/va_list.compat.c b/tests/expectations/va_list.compat.c index acaae099e..bdd8f4bbb 100644 --- a/tests/expectations/va_list.compat.c +++ b/tests/expectations/va_list.compat.c @@ -9,6 +9,8 @@ extern "C" { int32_t va_list_test(va_list ap); +int32_t va_list_test2(va_list ap); + #ifdef __cplusplus } // extern "C" #endif // __cplusplus diff --git a/tests/expectations/va_list.cpp b/tests/expectations/va_list.cpp index 80590743b..2a3344b1a 100644 --- a/tests/expectations/va_list.cpp +++ b/tests/expectations/va_list.cpp @@ -8,4 +8,6 @@ extern "C" { int32_t va_list_test(va_list ap); +int32_t va_list_test2(va_list ap); + } // extern "C" diff --git a/tests/expectations/va_list.pyx b/tests/expectations/va_list.pyx index a69280881..4ce0c8d7a 100644 --- a/tests/expectations/va_list.pyx +++ b/tests/expectations/va_list.pyx @@ -7,3 +7,5 @@ cdef extern from *: cdef extern from *: int32_t va_list_test(va_list ap); + + int32_t va_list_test2(va_list ap); diff --git a/tests/rust/va_list.rs b/tests/rust/va_list.rs index 1016091a9..13503dda7 100644 --- a/tests/rust/va_list.rs +++ b/tests/rust/va_list.rs @@ -4,3 +4,8 @@ use std::ffi::VaList; pub unsafe extern "C" fn va_list_test(mut ap: VaList) -> int32_t { ap.arg() } + +#[no_mangle] +pub unsafe extern "C" fn va_list_test2(mut ap: ...) -> int32_t { + ap.arg() +}