From: Matt Corallo Date: Sat, 30 Jan 2021 22:19:33 +0000 (-0500) Subject: [bindings] Add additional clone methods on manually-defined types X-Git-Tag: v0.0.13~32^2~9 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=ee07a73b82428189cf745905512534bc610b909d;p=rust-lightning [bindings] Add additional clone methods on manually-defined types --- diff --git a/lightning-c-bindings/src/c_types/mod.rs b/lightning-c-bindings/src/c_types/mod.rs index dcb8d3078..90f86f18f 100644 --- a/lightning-c-bindings/src/c_types/mod.rs +++ b/lightning-c-bindings/src/c_types/mod.rs @@ -45,6 +45,7 @@ impl SecretKey { } #[repr(C)] +#[derive(Clone)] pub struct Signature { pub compact_form: [u8; 64], } @@ -163,6 +164,8 @@ impl TxOut { } #[no_mangle] pub extern "C" fn TxOut_free(_res: TxOut) { } +#[no_mangle] +pub extern "C" fn TxOut_clone(orig: &TxOut) -> TxOut { orig.clone() } #[repr(C)] pub struct u8slice {