Skip to content

Commit cedfa38

Browse files
authored
bindgen: Document why we use the size_t != usize behavior
Reviewed-on: #68
2 parents bf3eb65 + d66f959 commit cedfa38

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

build.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ fn main() {
190190
.clang_args(&cflags)
191191
.use_core()
192192
.ctypes_prefix("core::ffi")
193-
// We've traditionally used size_t explicitly and cast it in riot-wrappers; changing this
194-
// now (going from bindgen 0.60 to 0.64) would break where it's used (although we still
195-
// might instate a type alias for size_t later instead).
193+
// This is the defensive choice in presence of odd targets, as it forces us to be explicit
194+
// more often: Bindgen would err with "Target platform requires `--no-size_t-is-usize`." in
195+
// some cases, even though we have not encountered them yet.
196196
.size_t_is_usize(false)
197197
.impl_debug(true)
198198
// Structs listed here are Packed and thus need impl_debug, but also contain non-Copy

0 commit comments

Comments
 (0)