doc: add missing float32/float64 FFI type names - #64874
Open
soulee-dev wants to merge 1 commit into
Open
Conversation
`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>
Collaborator
|
Review requested:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ToFFIType()acceptsfloat32andfloat64as aliases forfloatanddouble, but the supported type names list never included them. They were added to the parser in #62892, which only touchedsrc/ffi/types.cc, so the same section lists both asffi.typesconstant values a few lines below a list that omits them.Also splits
charonto its own line.u8,uint8andboolalways map toffi_type_uint8, whereascharmaps toffi_type_sint8orffi_type_uint8depending 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