Open
Description
Input C/C++ Header
typedef long double foo
Bindgen Invocation
$ bindgen input.h
Actual Results
/* automatically generated by rust-bindgen */
pub type a = u128;
Expected Results
I'm not entirely sure. Here are the idea's I can think of
- use f64, but that leeds to it's own set of issues (Incorrect size for long double when using old rust_target #1529).
- use the
f128
crate but the layout of thef128
is different to the layout of a clong double
- add a
c_longdouble
type tostd::os::raw
. The problem is that on many machines (including mine)long double
is a 16 byte float, which rust doesn't suport - Through an error. This will avoid confusion, but also make also will mean losing suport for many .h files
- use u128. The problem here is were treating a float as an int, and that will mean all sorts of problems