Pin compiler_builtins to 0.1.109 when building std
[ldk-c-bindings] / lightning-c-bindings / src / c_types / mod.rs
index bae1c404e5c6b6d7eeaa0e81627a13b13704f122..c8e140b3eae35316a711c8f4a60735f30ee3a40e 100644 (file)
@@ -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)]
@@ -774,6 +777,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], }