Map RawFd to Int

On all Unix systems, RawFd is defined as c_int.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2021-11-02 13:08:26 +04:00 committed by Emilio Cobos Álvarez
parent 577b041933
commit 24c130bd9c
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -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),