projects
/
ldk-c-bindings
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f04c90f
)
Correct args passed to supertrait C methods in subtrait impls
author
Matt Corallo
<git@bluematt.me>
Sat, 17 Jul 2021 17:39:44 +0000
(17:39 +0000)
committer
Matt Corallo
<git@bluematt.me>
Wed, 28 Jul 2021 17:06:58 +0000
(17:06 +0000)
c-bindings-gen/src/main.rs
patch
|
blob
|
history
diff --git
a/c-bindings-gen/src/main.rs
b/c-bindings-gen/src/main.rs
index 9693e3d560a04575cf51863ec180ce1d37956434..b08f2348002a1e9f1b9671d493b730756a210e48 100644
(file)
--- a/
c-bindings-gen/src/main.rs
+++ b/
c-bindings-gen/src/main.rs
@@
-427,7
+427,9
@@
fn writeln_trait<'a, 'b, W: std::io::Write>(w: &mut W, t: &'a syn::ItemTrait, ty
}
write_method_var_decl_body(w, &m.sig, "\t", $type_resolver, Some(&meth_gen_types), true);
write!(w, "(self{}.{})(", $impl_accessor, m.sig.ident).unwrap();
}
write_method_var_decl_body(w, &m.sig, "\t", $type_resolver, Some(&meth_gen_types), true);
write!(w, "(self{}.{})(", $impl_accessor, m.sig.ident).unwrap();
- write_method_call_params(w, &m.sig, "\t", $type_resolver, Some(&meth_gen_types), "", true);
+ let mut args = Vec::new();
+ write_method_call_params(&mut args, &m.sig, "\t", $type_resolver, Some(&meth_gen_types), "", true);
+ w.write_all(String::from_utf8(args).unwrap().replace("self", &format!("self{}", $impl_accessor)).as_bytes()).unwrap();
writeln!(w, "\n\t}}").unwrap();
},
writeln!(w, "\n\t}}").unwrap();
},