From: Matt Corallo Date: Wed, 13 Apr 2022 17:30:40 +0000 (+0000) Subject: Expose consistent free+clone methods for `Bech32Error` X-Git-Tag: v0.0.106.1^2~1 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=a7cf2f084b1fdde79bf52197708388b10ba93844;p=ldk-c-bindings Expose consistent free+clone methods for `Bech32Error` --- diff --git a/lightning-c-bindings/src/c_types/mod.rs b/lightning-c-bindings/src/c_types/mod.rs index 80f04c5..1e88f05 100644 --- a/lightning-c-bindings/src/c_types/mod.rs +++ b/lightning-c-bindings/src/c_types/mod.rs @@ -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)]