From a58030ce7e1784571b9be9e871f6cbe27a73b1a1 Mon Sep 17 00:00:00 2001 From: Soispha Date: Wed, 27 Mar 2024 22:12:17 +0100 Subject: [PATCH] fix(macros/generate/host/host/type): The function type is a c pointer --- src/macros/generate/convert/host/rust/type/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/macros/generate/convert/host/rust/type/mod.rs b/src/macros/generate/convert/host/rust/type/mod.rs index 6c274c1..6556065 100644 --- a/src/macros/generate/convert/host/rust/type/mod.rs +++ b/src/macros/generate/convert/host/rust/type/mod.rs @@ -45,10 +45,10 @@ impl Type { let inputs: Vec = inputs .iter() .map(|r#type| &r#type.r#type) - .map(Type::to_rust) + .map(Type::to_c) .collect(); let output = if let Some(output) = output { - let output = output.to_rust(); + let output = output.to_c(); quote! { -> #output } @@ -57,7 +57,7 @@ impl Type { }; quote! { - fn(#(#inputs),*) #output + extern "C" fn(#(#inputs),*) #output } } pub fn to_rust_typical(identifier: &Identifier, generic_args: &Vec) -> TokenStream2 {