From ee07a73b82428189cf745905512534bc610b909d Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 30 Jan 2021 17:19:33 -0500 Subject: [PATCH] [bindings] Add additional clone methods on manually-defined types --- lightning-c-bindings/src/c_types/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lightning-c-bindings/src/c_types/mod.rs b/lightning-c-bindings/src/c_types/mod.rs index dcb8d307..90f86f18 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 { -- 2.30.2