projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[bindings] Add additional clone methods on manually-defined types
[rust-lightning]
/
lightning-c-bindings
/
src
/
c_types
/
mod.rs
diff --git
a/lightning-c-bindings/src/c_types/mod.rs
b/lightning-c-bindings/src/c_types/mod.rs
index dcb8d3078bb84bca61f42ef3a2c50b00b0d0becf..90f86f18f38335dcfc2e5691beb856dadb1b0b43 100644
(file)
--- 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)]
}
#[repr(C)]
+#[derive(Clone)]
pub struct Signature {
pub compact_form: [u8; 64],
}
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_free(_res: TxOut) { }
+#[no_mangle]
+pub extern "C" fn TxOut_clone(orig: &TxOut) -> TxOut { orig.clone() }
#[repr(C)]
pub struct u8slice {
#[repr(C)]
pub struct u8slice {