From a7cf2f084b1fdde79bf52197708388b10ba93844 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 13 Apr 2022 17:30:40 +0000 Subject: [PATCH] Expose consistent free+clone methods for `Bech32Error` --- lightning-c-bindings/src/c_types/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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)] -- 2.39.5