From: Matt Corallo Date: Mon, 13 May 2024 18:31:53 +0000 (+0000) Subject: Expose a `BigEndianScalar_clone` method X-Git-Tag: v0.0.123.0^2~5 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=a200dc39abfa3f0998f6078bc7fac4089ebd5c8f;p=ldk-c-bindings Expose a `BigEndianScalar_clone` method --- diff --git a/lightning-c-bindings/src/c_types/mod.rs b/lightning-c-bindings/src/c_types/mod.rs index d4f4faf..c8e140b 100644 --- a/lightning-c-bindings/src/c_types/mod.rs +++ b/lightning-c-bindings/src/c_types/mod.rs @@ -292,6 +292,9 @@ impl BigEndianScalar { pub extern "C" fn BigEndianScalar_new(big_endian_bytes: ThirtyTwoBytes) -> BigEndianScalar { BigEndianScalar { big_endian_bytes: big_endian_bytes.data } } +#[no_mangle] +/// Creates a new BigEndianScalar which has the same data as `orig` +pub extern "C" fn BigEndianScalar_clone(orig: &BigEndianScalar) -> BigEndianScalar { orig.clone() } #[repr(C)] #[derive(Copy, Clone)]