fix(macros/generate/host/host/type): The function type is a c pointer

This commit is contained in:
Benedikt Peetz 2024-03-27 22:12:17 +01:00
parent 645b8d58f6
commit a58030ce7e
Signed by: bpeetz
GPG Key ID: A5E94010C3A642AD
1 changed files with 3 additions and 3 deletions

View File

@ -45,10 +45,10 @@ impl Type {
let inputs: Vec<TokenStream2> = 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<Type>) -> TokenStream2 {