X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-c-bindings;a=blobdiff_plain;f=lightning-c-bindings%2Fsrc%2Flightning_rapid_gossip_sync%2Ferror.rs;fp=lightning-c-bindings%2Fsrc%2Flightning_rapid_gossip_sync%2Ferror.rs;h=4b1b6ff8590c512e9691caee4bda4832e49df631;hp=4a768399bebc6f3ad93a18d88151ef5e0ebcc8cd;hb=5502fccd64611f16f5ebba3759c68b1a4d69b537;hpb=1ec49fac7433e5b8693c3858a3e25998bc888eeb diff --git a/lightning-c-bindings/src/lightning_rapid_gossip_sync/error.rs b/lightning-c-bindings/src/lightning_rapid_gossip_sync/error.rs index 4a76839..4b1b6ff 100644 --- a/lightning-c-bindings/src/lightning_rapid_gossip_sync/error.rs +++ b/lightning-c-bindings/src/lightning_rapid_gossip_sync/error.rs @@ -108,6 +108,16 @@ pub extern "C" fn GraphSyncError_free(this_ptr: GraphSyncError) { } pub extern "C" fn GraphSyncError_clone(orig: &GraphSyncError) -> GraphSyncError { orig.clone() } +#[allow(unused)] +/// Used only if an object of this type is returned as a trait impl by a method +pub(crate) extern "C" fn GraphSyncError_clone_void(this_ptr: *const c_void) -> *mut c_void { + Box::into_raw(Box::new(unsafe { (*(this_ptr as *const GraphSyncError)).clone() })) as *mut c_void +} +#[allow(unused)] +/// Used only if an object of this type is returned as a trait impl by a method +pub(crate) extern "C" fn GraphSyncError_free_void(this_ptr: *mut c_void) { + let _ = unsafe { Box::from_raw(this_ptr as *mut GraphSyncError) }; +} #[no_mangle] /// Utility method to constructs a new DecodeError-variant GraphSyncError pub extern "C" fn GraphSyncError_decode_error(a: crate::lightning::ln::msgs::DecodeError) -> GraphSyncError {