]> git.bitcoin.ninja Git - ldk-c-bindings/commitdiff
Expose consistent free+clone methods for `Bech32Error`
authorMatt Corallo <git@bluematt.me>
Wed, 13 Apr 2022 17:30:40 +0000 (17:30 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 13 Apr 2022 17:30:40 +0000 (17:30 +0000)
lightning-c-bindings/src/c_types/mod.rs

index 80f04c523f421d9fd2cd64fcbb9ae0c767781999..1e88f0521e53c8ce56372278b3dcb17d3e4db3e5 100644 (file)
@@ -227,6 +227,12 @@ impl Bech32Error {
                }
        }
 }
+#[no_mangle]
+/// Creates a new Bech32Error which has the same data as `orig`
+pub extern "C" fn Bech32Error_clone(orig: &Bech32Error) -> Bech32Error { orig.clone() }
+#[no_mangle]
+/// Releases any memory held by the given `Bech32Error` (which is currently none)
+pub extern "C" fn Bech32Error_free(o: Bech32Error) { }
 
 #[repr(C)]
 #[derive(Clone, Copy, PartialEq)]