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
|
let inputs: Vec<TokenStream2> = inputs
|
||||||
.iter()
|
.iter()
|
||||||
.map(|r#type| &r#type.r#type)
|
.map(|r#type| &r#type.r#type)
|
||||||
.map(Type::to_rust)
|
.map(Type::to_c)
|
||||||
.collect();
|
.collect();
|
||||||
let output = if let Some(output) = output {
|
let output = if let Some(output) = output {
|
||||||
let output = output.to_rust();
|
let output = output.to_c();
|
||||||
quote! {
|
quote! {
|
||||||
-> #output
|
-> #output
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ impl Type {
|
||||||
};
|
};
|
||||||
|
|
||||||
quote! {
|
quote! {
|
||||||
fn(#(#inputs),*) #output
|
extern "C" fn(#(#inputs),*) #output
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn to_rust_typical(identifier: &Identifier, generic_args: &Vec<Type>) -> TokenStream2 {
|
pub fn to_rust_typical(identifier: &Identifier, generic_args: &Vec<Type>) -> TokenStream2 {
|
||||||
|
|
Reference in New Issue