Skip to content

Commit b4c2457

Browse files
committed
- bindings updates
1 parent d895e3f commit b4c2457

File tree

12 files changed

+120
-120
lines changed

12 files changed

+120
-120
lines changed

lightning-c-bindings/include/lightning.h

Lines changed: 60 additions & 60 deletions
Large diffs are not rendered by default.

lightning-c-bindings/src/chain/chainmonitor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ impl From<nativeChainMonitor> for crate::chain::Watch {
128128
}
129129
}
130130
#[no_mangle]
131-
pub extern "C" fn ChainMonitor_as_Watch(this_arg: *const ChainMonitor) -> crate::chain::Watch {
131+
pub extern "C" fn ChainMonitor_as_Watch(this_arg: &ChainMonitor) -> crate::chain::Watch {
132132
crate::chain::Watch {
133133
this_arg: unsafe { (*this_arg).inner as *mut c_void },
134134
free: None,
@@ -168,7 +168,7 @@ impl From<nativeChainMonitor> for crate::util::events::EventsProvider {
168168
}
169169
}
170170
#[no_mangle]
171-
pub extern "C" fn ChainMonitor_as_EventsProvider(this_arg: *const ChainMonitor) -> crate::util::events::EventsProvider {
171+
pub extern "C" fn ChainMonitor_as_EventsProvider(this_arg: &ChainMonitor) -> crate::util::events::EventsProvider {
172172
crate::util::events::EventsProvider {
173173
this_arg: unsafe { (*this_arg).inner as *mut c_void },
174174
free: None,

lightning-c-bindings/src/chain/channelmonitor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pub extern "C" fn ChannelMonitorUpdate_set_update_id(this_ptr: &mut ChannelMonit
112112
#[no_mangle]
113113
pub static CLOSED_CHANNEL_UPDATE_ID: u64 = lightning::chain::channelmonitor::CLOSED_CHANNEL_UPDATE_ID;
114114
#[no_mangle]
115-
pub extern "C" fn ChannelMonitorUpdate_write(obj: *const ChannelMonitorUpdate) -> crate::c_types::derived::CVec_u8Z {
115+
pub extern "C" fn ChannelMonitorUpdate_write(obj: &ChannelMonitorUpdate) -> crate::c_types::derived::CVec_u8Z {
116116
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
117117
}
118118
#[no_mangle]
@@ -379,7 +379,7 @@ pub extern "C" fn HTLCUpdate_clone(orig: &HTLCUpdate) -> HTLCUpdate {
379379
HTLCUpdate { inner: Box::into_raw(Box::new(unsafe { &*orig.inner }.clone())), is_owned: true }
380380
}
381381
#[no_mangle]
382-
pub extern "C" fn HTLCUpdate_write(obj: *const HTLCUpdate) -> crate::c_types::derived::CVec_u8Z {
382+
pub extern "C" fn HTLCUpdate_write(obj: &HTLCUpdate) -> crate::c_types::derived::CVec_u8Z {
383383
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
384384
}
385385
#[no_mangle]
@@ -448,7 +448,7 @@ impl ChannelMonitor {
448448
}
449449
}
450450
#[no_mangle]
451-
pub extern "C" fn ChannelMonitor_write(obj: *const ChannelMonitor) -> crate::c_types::derived::CVec_u8Z {
451+
pub extern "C" fn ChannelMonitor_write(obj: &ChannelMonitor) -> crate::c_types::derived::CVec_u8Z {
452452
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
453453
}
454454
#[no_mangle]

lightning-c-bindings/src/chain/keysinterface.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ pub extern "C" fn SpendableOutputDescriptor_clone(orig: &SpendableOutputDescript
225225
orig.clone()
226226
}
227227
#[no_mangle]
228-
pub extern "C" fn SpendableOutputDescriptor_write(obj: *const SpendableOutputDescriptor) -> crate::c_types::derived::CVec_u8Z {
228+
pub extern "C" fn SpendableOutputDescriptor_write(obj: &SpendableOutputDescriptor) -> crate::c_types::derived::CVec_u8Z {
229229
crate::c_types::serialize_obj(&unsafe { &*obj }.to_native())
230230
}
231231
#[no_mangle]
@@ -753,7 +753,7 @@ impl From<nativeInMemoryChannelKeys> for crate::chain::keysinterface::ChannelKey
753753
}
754754
}
755755
#[no_mangle]
756-
pub extern "C" fn InMemoryChannelKeys_as_ChannelKeys(this_arg: *const InMemoryChannelKeys) -> crate::chain::keysinterface::ChannelKeys {
756+
pub extern "C" fn InMemoryChannelKeys_as_ChannelKeys(this_arg: &InMemoryChannelKeys) -> crate::chain::keysinterface::ChannelKeys {
757757
crate::chain::keysinterface::ChannelKeys {
758758
this_arg: unsafe { (*this_arg).inner as *mut c_void },
759759
free: None,
@@ -853,7 +853,7 @@ extern "C" fn InMemoryChannelKeys_ChannelKeys_on_accept(this_arg: *mut c_void, c
853853
}
854854

855855
#[no_mangle]
856-
pub extern "C" fn InMemoryChannelKeys_write(obj: *const InMemoryChannelKeys) -> crate::c_types::derived::CVec_u8Z {
856+
pub extern "C" fn InMemoryChannelKeys_write(obj: &InMemoryChannelKeys) -> crate::c_types::derived::CVec_u8Z {
857857
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
858858
}
859859
#[no_mangle]
@@ -959,7 +959,7 @@ impl From<nativeKeysManager> for crate::chain::keysinterface::KeysInterface {
959959
}
960960
}
961961
#[no_mangle]
962-
pub extern "C" fn KeysManager_as_KeysInterface(this_arg: *const KeysManager) -> crate::chain::keysinterface::KeysInterface {
962+
pub extern "C" fn KeysManager_as_KeysInterface(this_arg: &KeysManager) -> crate::chain::keysinterface::KeysInterface {
963963
crate::chain::keysinterface::KeysInterface {
964964
this_arg: unsafe { (*this_arg).inner as *mut c_void },
965965
free: None,

lightning-c-bindings/src/chain/transaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ pub extern "C" fn OutPoint_to_channel_id(this_arg: &OutPoint) -> crate::c_types:
101101
}
102102

103103
#[no_mangle]
104-
pub extern "C" fn OutPoint_write(obj: *const OutPoint) -> crate::c_types::derived::CVec_u8Z {
104+
pub extern "C" fn OutPoint_write(obj: &OutPoint) -> crate::c_types::derived::CVec_u8Z {
105105
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
106106
}
107107
#[no_mangle]

lightning-c-bindings/src/ln/chan_utils.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ pub extern "C" fn TxCreationKeys_new(mut per_commitment_point_arg: crate::c_type
208208
})), is_owned: true }
209209
}
210210
#[no_mangle]
211-
pub extern "C" fn TxCreationKeys_write(obj: *const TxCreationKeys) -> crate::c_types::derived::CVec_u8Z {
211+
pub extern "C" fn TxCreationKeys_write(obj: &TxCreationKeys) -> crate::c_types::derived::CVec_u8Z {
212212
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
213213
}
214214
#[no_mangle]
@@ -446,7 +446,7 @@ pub extern "C" fn ChannelPublicKeys_new(mut funding_pubkey_arg: crate::c_types::
446446
})), is_owned: true }
447447
}
448448
#[no_mangle]
449-
pub extern "C" fn ChannelPublicKeys_write(obj: *const ChannelPublicKeys) -> crate::c_types::derived::CVec_u8Z {
449+
pub extern "C" fn ChannelPublicKeys_write(obj: &ChannelPublicKeys) -> crate::c_types::derived::CVec_u8Z {
450450
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
451451
}
452452
#[no_mangle]
@@ -587,7 +587,7 @@ pub extern "C" fn HTLCOutputInCommitment_set_payment_hash(this_ptr: &mut HTLCOut
587587
unsafe { &mut *this_ptr.inner }.payment_hash = ::lightning::ln::channelmanager::PaymentHash(val.data);
588588
}
589589
#[no_mangle]
590-
pub extern "C" fn HTLCOutputInCommitment_write(obj: *const HTLCOutputInCommitment) -> crate::c_types::derived::CVec_u8Z {
590+
pub extern "C" fn HTLCOutputInCommitment_write(obj: &HTLCOutputInCommitment) -> crate::c_types::derived::CVec_u8Z {
591591
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
592592
}
593593
#[no_mangle]
@@ -793,7 +793,7 @@ pub extern "C" fn HolderCommitmentTransaction_get_htlc_sigs(this_arg: &HolderCom
793793
}
794794

795795
#[no_mangle]
796-
pub extern "C" fn HolderCommitmentTransaction_write(obj: *const HolderCommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
796+
pub extern "C" fn HolderCommitmentTransaction_write(obj: &HolderCommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
797797
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
798798
}
799799
#[no_mangle]

lightning-c-bindings/src/ln/channelmanager.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ impl From<nativeChannelManager> for crate::util::events::MessageSendEventsProvid
567567
}
568568
}
569569
#[no_mangle]
570-
pub extern "C" fn ChannelManager_as_MessageSendEventsProvider(this_arg: *const ChannelManager) -> crate::util::events::MessageSendEventsProvider {
570+
pub extern "C" fn ChannelManager_as_MessageSendEventsProvider(this_arg: &ChannelManager) -> crate::util::events::MessageSendEventsProvider {
571571
crate::util::events::MessageSendEventsProvider {
572572
this_arg: unsafe { (*this_arg).inner as *mut c_void },
573573
free: None,
@@ -593,7 +593,7 @@ impl From<nativeChannelManager> for crate::util::events::EventsProvider {
593593
}
594594
}
595595
#[no_mangle]
596-
pub extern "C" fn ChannelManager_as_EventsProvider(this_arg: *const ChannelManager) -> crate::util::events::EventsProvider {
596+
pub extern "C" fn ChannelManager_as_EventsProvider(this_arg: &ChannelManager) -> crate::util::events::EventsProvider {
597597
crate::util::events::EventsProvider {
598598
this_arg: unsafe { (*this_arg).inner as *mut c_void },
599599
free: None,
@@ -635,7 +635,7 @@ impl From<nativeChannelManager> for crate::ln::msgs::ChannelMessageHandler {
635635
}
636636
}
637637
#[no_mangle]
638-
pub extern "C" fn ChannelManager_as_ChannelMessageHandler(this_arg: *const ChannelManager) -> crate::ln::msgs::ChannelMessageHandler {
638+
pub extern "C" fn ChannelManager_as_ChannelMessageHandler(this_arg: &ChannelManager) -> crate::ln::msgs::ChannelMessageHandler {
639639
crate::ln::msgs::ChannelMessageHandler {
640640
this_arg: unsafe { (*this_arg).inner as *mut c_void },
641641
free: None,
@@ -732,7 +732,7 @@ extern "C" fn ChannelManager_ChannelMessageHandler_get_and_clear_pending_msg_eve
732732
}
733733

734734
#[no_mangle]
735-
pub extern "C" fn ChannelManager_write(obj: *const ChannelManager) -> crate::c_types::derived::CVec_u8Z {
735+
pub extern "C" fn ChannelManager_write(obj: &ChannelManager) -> crate::c_types::derived::CVec_u8Z {
736736
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
737737
}
738738
#[no_mangle]

0 commit comments

Comments
 (0)