From: Matt Corallo Date: Sun, 12 May 2024 14:35:21 +0000 (+0000) Subject: Support clone for `ThreeBytes` X-Git-Tag: v0.0.123.0^2~6 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=b4d880393c19d51e92256210c5ddc2aaec0e30ee;p=ldk-c-bindings Support clone for `ThreeBytes` --- diff --git a/c-bindings-gen/src/types.rs b/c-bindings-gen/src/types.rs index fb884c9..6cb8061 100644 --- a/c-bindings-gen/src/types.rs +++ b/c-bindings-gen/src/types.rs @@ -861,6 +861,7 @@ fn initial_clonable_types() -> HashSet { let mut res = HashSet::new(); res.insert("crate::c_types::U5".to_owned()); res.insert("crate::c_types::U128".to_owned()); + res.insert("crate::c_types::ThreeBytes".to_owned()); res.insert("crate::c_types::FourBytes".to_owned()); res.insert("crate::c_types::TwelveBytes".to_owned()); res.insert("crate::c_types::SixteenBytes".to_owned()); diff --git a/lightning-c-bindings/src/c_types/mod.rs b/lightning-c-bindings/src/c_types/mod.rs index bae1c40..d4f4faf 100644 --- a/lightning-c-bindings/src/c_types/mod.rs +++ b/lightning-c-bindings/src/c_types/mod.rs @@ -774,6 +774,7 @@ pub struct ThirtyTwoBytes { pub data: [u8; 32], } +#[derive(Clone)] #[repr(C)] /// A 3-byte byte array. pub struct ThreeBytes { /** The three bytes */ pub data: [u8; 3], }