From a200dc39abfa3f0998f6078bc7fac4089ebd5c8f Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 13 May 2024 18:31:53 +0000 Subject: [PATCH] Expose a `BigEndianScalar_clone` method --- lightning-c-bindings/src/c_types/mod.rs | 3 +++ 1 file changed, 3 insertions(+) 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)] -- 2.39.5