X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=blobdiff_plain;f=lightning-c-bindings%2Fsrc%2Fchain%2Fchainmonitor.rs;h=3039ec6fa2b9f6fa8c7600149fa0db5d50a7b21e;hp=c05f9017ca1eb6888aff883701b3642661b6339b;hb=a132c4d7f8648278537854ae08a83d704853ed42;hpb=b33df3ebba7af25aa0e53654953d8493406109ed diff --git a/lightning-c-bindings/src/chain/chainmonitor.rs b/lightning-c-bindings/src/chain/chainmonitor.rs index c05f901..3039ec6 100644 --- a/lightning-c-bindings/src/chain/chainmonitor.rs +++ b/lightning-c-bindings/src/chain/chainmonitor.rs @@ -41,9 +41,15 @@ type nativeChainMonitor = nativeChainMonitorImport for crate::chain::Watch { ret } } +/// Constructs a new Watch which calls the relevant methods on this_arg. +/// This copies the `inner` pointer in this_arg and thus the returned Watch must be freed before this_arg is #[no_mangle] pub extern "C" fn ChainMonitor_as_Watch(this_arg: &ChainMonitor) -> crate::chain::Watch { crate::chain::Watch { @@ -167,6 +176,8 @@ impl From for crate::util::events::EventsProvider { ret } } +/// Constructs a new EventsProvider which calls the relevant methods on this_arg. +/// This copies the `inner` pointer in this_arg and thus the returned EventsProvider must be freed before this_arg is #[no_mangle] pub extern "C" fn ChainMonitor_as_EventsProvider(this_arg: &ChainMonitor) -> crate::util::events::EventsProvider { crate::util::events::EventsProvider {