X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-c-bindings%2Fsrc%2Flightning%2Fchain%2Ftransaction.rs;h=59cf6d14296a9f3a01134154362c5d5671d4a415;hb=a945b11d9f16864753054a47128d71a96de29f73;hp=6971d5e80e0eea57e339d3b5b3f6bf602ebd565f;hpb=4ed52804d3cd73f05bba6a705528d0d43495aa88;p=ldk-c-bindings diff --git a/lightning-c-bindings/src/lightning/chain/transaction.rs b/lightning-c-bindings/src/lightning/chain/transaction.rs index 6971d5e..59cf6d1 100644 --- a/lightning-c-bindings/src/lightning/chain/transaction.rs +++ b/lightning-c-bindings/src/lightning/chain/transaction.rs @@ -16,7 +16,7 @@ use crate::c_types::*; use lightning::chain::transaction::OutPoint as nativeOutPointImport; -type nativeOutPoint = nativeOutPointImport; +pub(crate) type nativeOutPoint = nativeOutPointImport; /// A reference to a transaction output. /// @@ -49,7 +49,7 @@ impl Drop for OutPoint { pub extern "C" fn OutPoint_free(this_obj: OutPoint) { } #[allow(unused)] /// Used only if an object of this type is returned as a trait impl by a method -extern "C" fn OutPoint_free_void(this_ptr: *mut c_void) { +pub(crate) extern "C" fn OutPoint_free_void(this_ptr: *mut c_void) { unsafe { let _ = Box::from_raw(this_ptr as *mut nativeOutPoint); } } #[allow(unused)] @@ -157,7 +157,7 @@ pub(crate) extern "C" fn OutPoint_write_void(obj: *const c_void) -> crate::c_typ #[no_mangle] /// Read a OutPoint from a byte array, created by OutPoint_write pub extern "C" fn OutPoint_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_OutPointDecodeErrorZ { - let res = crate::c_types::deserialize_obj(ser); + let res: Result = crate::c_types::deserialize_obj(ser); let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::lightning::chain::transaction::OutPoint { inner: ObjOps::heap_alloc(o), is_owned: true } }).into(), Err(mut e) => crate::c_types::CResultTempl::err( { crate::lightning::ln::msgs::DecodeError { inner: ObjOps::heap_alloc(e), is_owned: true } }).into() }; local_res }