Closed jethrogb closed 7 years ago
cexpr 0.2.1 introduced a regression in bindgen 0.19.1
Input header file:
#define MBEDTLS_ECP_MAX_BITS 521 #define MBEDTLS_ECP_MAX_BYTES ( ( MBEDTLS_ECP_MAX_BITS + 7 ) / 8 ) #define MBEDTLS_ECDSA_MAX_LEN ( 3 + 2 * ( 3 + MBEDTLS_ECP_MAX_BYTES ) )
Output with bindgen 0.19.1 and cexpr 0.2.0:
/* automatically generated by rust-bindgen */ #![allow(dead_code, non_camel_case_types, non_upper_case_globals, non_snake_case)] pub const MBEDTLS_ECP_MAX_BITS: ::std::os::raw::c_ushort = 521; pub const MBEDTLS_ECP_MAX_BYTES: ::std::os::raw::c_uchar = 66; pub const MBEDTLS_ECDSA_MAX_LEN: ::std::os::raw::c_uchar = 141;
Output with bindgen 0.19.1 and cexpr 0.2.1:
/* automatically generated by rust-bindgen */ #![allow(dead_code, non_camel_case_types, non_upper_case_globals, non_snake_case)] pub const MBEDTLS_ECP_MAX_BITS: ::std::os::raw::c_ushort = 521; pub const MBEDTLS_ECP_MAX_BYTES: ::std::os::raw::c_uchar = 66;
(You can get the old versions of bindgen using cargo clone)
cargo clone
Done, and bug fixed in 75265c358e29a39e4cfec528e669a9d0a8e7ff4a / 0.2.2
cexpr 0.2.1 introduced a regression in bindgen 0.19.1
Input header file:
Output with bindgen 0.19.1 and cexpr 0.2.0:
Output with bindgen 0.19.1 and cexpr 0.2.1:
(You can get the old versions of bindgen using
cargo clone
)