mirror of
https://github.com/Sarsoo/csbindgen.git
synced 2024-12-22 22:46:26 +00:00
function pointer params now has names
This commit is contained in:
parent
f33f18bb8c
commit
737bbd1fc5
@ -442,7 +442,8 @@ pub fn build_method_delegate_if_required(
|
|||||||
|
|
||||||
let joined_param = parameters
|
let joined_param = parameters
|
||||||
.iter()
|
.iter()
|
||||||
.map(|p| {
|
.enumerate()
|
||||||
|
.map(|(index, p)| {
|
||||||
let cs = p.rust_type.to_csharp_string(
|
let cs = p.rust_type.to_csharp_string(
|
||||||
options,
|
options,
|
||||||
alias_map,
|
alias_map,
|
||||||
@ -450,7 +451,11 @@ pub fn build_method_delegate_if_required(
|
|||||||
method_name,
|
method_name,
|
||||||
parameter_name,
|
parameter_name,
|
||||||
);
|
);
|
||||||
format!("{} {}", cs, escape_name(p.name.as_str()))
|
// a is ascii for 97
|
||||||
|
let parameter_name = char::from_u32(index as u32 + 97)
|
||||||
|
.unwrap_or('?')
|
||||||
|
.to_string();
|
||||||
|
format!("{} {}", cs, escape_name(parameter_name.as_str()))
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
.join(", ");
|
.join(", ");
|
||||||
|
Loading…
Reference in New Issue
Block a user