From eb5dd9a7f64f9c886fbd17395afb6c07ce290a7c Mon Sep 17 00:00:00 2001 From: Soul Lee Date: Fri, 31 Jul 2026 22:42:58 +0900 Subject: [PATCH] doc: add missing float32/float64 FFI type names `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 --- doc/api/ffi.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/api/ffi.md b/doc/api/ffi.md index 94dc9e42f03d..db040d78ba5e 100644 --- a/doc/api/ffi.md +++ b/doc/api/ffi.md @@ -62,16 +62,17 @@ FFI signatures use string type names. Supported type names: * `void` +* `char` * `i8`, `int8` -* `u8`, `uint8`, `bool`, `char` +* `u8`, `uint8`, `bool` * `i16`, `int16` * `u16`, `uint16` * `i32`, `int32` * `u32`, `uint32` * `i64`, `int64` * `u64`, `uint64` -* `f32`, `float` -* `f64`, `double` +* `f32`, `float`, `float32` +* `f64`, `double`, `float64` * `pointer`, `ptr` * `string`, `str` * `buffer`