projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c35002f
)
[bindings] Add additional clone methods on manually-defined types
author
Matt Corallo
<git@bluematt.me>
Sat, 30 Jan 2021 22:19:33 +0000
(17:19 -0500)
committer
Matt Corallo
<git@bluematt.me>
Thu, 11 Feb 2021 03:24:16 +0000
(22:24 -0500)
lightning-c-bindings/src/c_types/mod.rs
patch
|
blob
|
history
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)]
+#[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 {