1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-24 09:17:17 +00:00

Add r32 and r64 aliases for real numbers in ffi types.

This commit is contained in:
Calvin Rose 2022-06-11 09:40:37 -05:00
parent c75b088ff8
commit 0bc96304a9
2 changed files with 3 additions and 0 deletions

View File

@ -227,6 +227,8 @@ static JanetFFIPrimType decode_ffi_prim(const uint8_t *name) {
if (!janet_cstrcmp(name, "ssize")) return JANET_FFI_TYPE_INT32;
#endif
/* aliases */
if (!janet_cstrcmp(name, "r32")) return JANET_FFI_TYPE_FLOAT;
if (!janet_cstrcmp(name, "r64")) return JANET_FFI_TYPE_DOUBLE;
if (!janet_cstrcmp(name, "s8")) return JANET_FFI_TYPE_INT8;
if (!janet_cstrcmp(name, "u8")) return JANET_FFI_TYPE_UINT8;
if (!janet_cstrcmp(name, "s16")) return JANET_FFI_TYPE_INT16;

View File

@ -17,6 +17,7 @@
"quote"
"quasiquote"
"unquote"
"upscope"
"splice"]
(all-bindings)))
(def allsyms (dyn :allsyms))