summaryrefslogtreecommitdiff
path: root/ext/ffi/jit_trampoline.rs
diff options
context:
space:
mode:
authorAapo Alasuutari <aapo.alasuutari@gmail.com>2022-09-05 06:26:52 +0300
committerGitHub <noreply@github.com>2022-09-05 08:56:52 +0530
commit16dbf4adc390c9fb7656372b42811c1929e755dd (patch)
treebff7c876c97e5eb56d2d08de0198fe7640ddb031 /ext/ffi/jit_trampoline.rs
parent08a6af398fd92517193e20117f9971c272b1bb5f (diff)
feat(ext/ffi): Support bool FFI type (#15754)
Diffstat (limited to 'ext/ffi/jit_trampoline.rs')
-rw-r--r--ext/ffi/jit_trampoline.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/ffi/jit_trampoline.rs b/ext/ffi/jit_trampoline.rs
index 75cdae51d..6cb8ec74c 100644
--- a/ext/ffi/jit_trampoline.rs
+++ b/ext/ffi/jit_trampoline.rs
@@ -23,6 +23,7 @@ macro_rules! cstr {
fn native_arg_to_c(ty: &NativeType) -> &'static str {
match ty {
+ NativeType::Bool => "bool",
NativeType::U8 | NativeType::U16 | NativeType::U32 => "uint32_t",
NativeType::I8 | NativeType::I16 | NativeType::I32 => "int32_t",
NativeType::Void => "void",
@@ -39,6 +40,7 @@ fn native_arg_to_c(ty: &NativeType) -> &'static str {
fn native_to_c(ty: &NativeType) -> &'static str {
match ty {
+ NativeType::Bool => "bool",
NativeType::U8 => "uint8_t",
NativeType::U16 => "uint16_t",
NativeType::U32 => "uint32_t",