fix(macros/generate/host/host/type): The function type is a c pointer
This commit is contained in:
parent
645b8d58f6
commit
a58030ce7e
|
@ -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 {
|
||||
|
|
Reference in New Issue