Many projects (including nettle-sys, linux-kernel-module-rust, nodejs-sys, bcc-sys) are moving to revert to the pre-0.53 behavior that maps size_t and usize. These projects (and many others if #1902 is merged) will fail subtly if they use bindgen over a C API that includes size_t on a weird niche platform where size_t ≠ uintptr_t. if bindgen detects that this situation is happening, it should produce an error.
the three conditions that should produce an error (all conditions must be present) are:
size_t_is_usize is set to true
- The source C API includes a
size_t
- The platform's
size_t is not the same underlying type as uintptr_t
(see also #1901 and #1671 for background)
Many projects (including nettle-sys, linux-kernel-module-rust, nodejs-sys, bcc-sys) are moving to revert to the pre-0.53 behavior that maps
size_tandusize. These projects (and many others if #1902 is merged) will fail subtly if they use bindgen over a C API that includessize_ton a weird niche platform wheresize_t≠uintptr_t. ifbindgendetects that this situation is happening, it should produce an error.the three conditions that should produce an error (all conditions must be present) are:
size_t_is_usizeis set totruesize_tsize_tis not the same underlying type asuintptr_t(see also #1901 and #1671 for background)