Skip to content

Commit

Permalink
Map RawFd to Int
Browse files Browse the repository at this point in the history
On all Unix systems, RawFd is defined as c_int.

Signed-off-by: Marc-André Lureau <[email protected]>
  • Loading branch information
elmarco authored and emilio committed Nov 2, 2021
1 parent 577b041 commit 24c130b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ cbindgen contains the following hardcoded mappings (again completely ignoring na
* f32 => float
* f64 => double
* VaList => va_list
* RawFd => int
* PhantomData => *evaporates*, can only appear as the field of a type
* PhantomPinned => *evaporates*, can only appear as the field of a type
* () => *evaporates*, can only appear as the field of a type
Expand Down
1 change: 1 addition & 0 deletions src/bindgen/ir/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ impl PrimitiveType {
"c_ulong" => (IntKind::Long, false),
"c_ulonglong" => (IntKind::LongLong, false),
"size_t" => (IntKind::SizeT, false),
"RawFd" => (IntKind::Int, true),

"isize" | "intptr_t" => (IntKind::Size, true),
"usize" | "uintptr_t" => (IntKind::Size, false),
Expand Down

0 comments on commit 24c130b

Please sign in to comment.