Skip to content

doc: add missing float32/float64 FFI type names - #64874

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
soulee-dev:doc-ffi-float-type-names
Aug 2, 2026
Merged

doc: add missing float32/float64 FFI type names#64874
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
soulee-dev:doc-ffi-float-type-names

Conversation

@soulee-dev

Copy link
Copy Markdown
Contributor

ToFFIType() accepts float32 and float64 as aliases for float and double, but the supported type names list never included them. They were added to the parser in #62892, which only touched src/ffi/types.cc, so the same section lists both as ffi.types constant values a few lines below a list that omits them.

Also splits char onto its own line. u8, uint8 and bool always map to ffi_type_uint8, whereas char maps to ffi_type_sint8 or ffi_type_uint8 depending on the platform, as the paragraph below the list already documents.

#64848 proposes removing these aliases entirely; this only makes the list match what ToFFIType() accepts today, and those lines can go away with the aliases if that lands.

Refs: #62892
Refs: #64848

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/ffi

@nodejs-github-botnodejs-github-bot added doc Issues and PRs related to the documentations. ffi Issues and PRs related to experimental Foreign Function Interface support. labels Jul 31, 2026
Comment threaddoc/api/ffi.md Outdated
`ToFFIType()` accepts `float32` and `float64` as aliases for `float`
and `double`, and both names already appear in the `ffi.types`
constants list further down the same page, but they were missing from
the list of supported type names.
Also split `char` onto its own line. Unlike `u8`, `uint8` and `bool`,
which always map to `ffi_type_uint8`, `char` maps to either
`ffi_type_sint8` or `ffi_type_uint8` depending on the platform C ABI,
as the paragraph below the list already explains.
Signed-off-by: Soul Lee <alus20x@gmail.com>
@soulee-dev
soulee-devforce-pushed the doc-ffi-float-type-names branch from 5773cd1 to eb5dd9aCompareJuly 31, 2026 22:23
@Renegade334Renegade334 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 1, 2026
@Renegade334Renegade334 added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 1, 2026
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 2, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 7c6bce0 into nodejs:mainAug 2, 2026
22 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 7c6bce0

aduh95 pushed a commit that referenced this pull request Aug 3, 2026
`ToFFIType()` accepts `float32` and `float64` as aliases for `float`
and `double`, and both names already appear in the `ffi.types`
constants list further down the same page, but they were missing from
the list of supported type names.
Also split `char` onto its own line. Unlike `u8`, `uint8` and `bool`,
which always map to `ffi_type_uint8`, `char` maps to either
`ffi_type_sint8` or `ffi_type_uint8` depending on the platform C ABI,
as the paragraph below the list already explains.
Signed-off-by: Soul Lee <alus20x@gmail.com>
PR-URL: #64874
Refs: #62892
Refs: #64848
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 4, 2026
`ToFFIType()` accepts `float32` and `float64` as aliases for `float`
and `double`, and both names already appear in the `ffi.types`
constants list further down the same page, but they were missing from
the list of supported type names.
Also split `char` onto its own line. Unlike `u8`, `uint8` and `bool`,
which always map to `ffi_type_uint8`, `char` maps to either
`ffi_type_sint8` or `ffi_type_uint8` depending on the platform C ABI,
as the paragraph below the list already explains.
Signed-off-by: Soul Lee <alus20x@gmail.com>
PR-URL: #64874
Refs: #62892
Refs: #64848
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 4, 2026
`ToFFIType()` accepts `float32` and `float64` as aliases for `float`
and `double`, and both names already appear in the `ffi.types`
constants list further down the same page, but they were missing from
the list of supported type names.
Also split `char` onto its own line. Unlike `u8`, `uint8` and `bool`,
which always map to `ffi_type_uint8`, `char` maps to either
`ffi_type_sint8` or `ffi_type_uint8` depending on the platform C ABI,
as the paragraph below the list already explains.
Signed-off-by: Soul Lee <alus20x@gmail.com>
PR-URL: #64874
Refs: #62892
Refs: #64848
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
aduh95 pushed a commit that referenced this pull request Aug 5, 2026
`ToFFIType()` accepts `float32` and `float64` as aliases for `float`
and `double`, and both names already appear in the `ffi.types`
constants list further down the same page, but they were missing from
the list of supported type names.
Also split `char` onto its own line. Unlike `u8`, `uint8` and `bool`,
which always map to `ffi_type_uint8`, `char` maps to either
`ffi_type_sint8` or `ffi_type_uint8` depending on the platform C ABI,
as the paragraph below the list already explains.
Signed-off-by: Soul Lee <alus20x@gmail.com>
PR-URL: #64874
Refs: #62892
Refs: #64848
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.docIssues and PRs related to the documentations.ffiIssues and PRs related to experimental Foreign Function Interface support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@soulee-dev@nodejs-github-bot@ShogunPanda@UlisesGascon@Renegade334