autocxx
autocxx copied to clipboard
Support arrays
Got
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseError(MacroParseFail(Conversion(UnsupportedType("[u64 ; 4usize]"))))', demo/build.rs:23:92
from these bindgen bindings:
#[inline]
pub unsafe fn set_fail_intercept(&mut self, fail_intercept: [u64; 4usize]) {
set_fail_intercept(self, fail_intercept)
}
(for example. Probably many other cases)
#967 shows how cxx supports arrays.
Sitrep: Arrays still unsupported. Lots of demand!
Current behavior:
inline std::array<uint8_t, 6> getIVs()
{
std::array<uint8_t, 6> myarray = { 0, 1, 2, 3};
return myarray;
}
results in bindgen giving us this:
extern "C" {
#[cpp_semantics(incomprehensible_param_in_arg_or_return)]
#[link_name = "\u{1}__Z6getIVsv"]
pub fn getIVs() -> [u8; 6usize];
}