[bindings] Add additional clone methods on manually-defined types
[rust-lightning] / lightning-c-bindings / src / c_types / mod.rs
index dcb8d3078bb84bca61f42ef3a2c50b00b0d0becf..90f86f18f38335dcfc2e5691beb856dadb1b0b43 100644 (file)
@@ -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 {