Skip to content

Commit 339e355

Browse files
committed
- bindings updates
1 parent 63d21e4 commit 339e355

File tree

12 files changed

+130
-130
lines changed

12 files changed

+130
-130
lines changed

lightning-c-bindings/include/lightning.h

Lines changed: 65 additions & 65 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]
@@ -772,7 +772,7 @@ impl From<nativeInMemoryChannelKeys> for crate::chain::keysinterface::ChannelKey
772772
}
773773
}
774774
#[no_mangle]
775-
pub extern "C" fn InMemoryChannelKeys_as_ChannelKeys(this_arg: *const InMemoryChannelKeys) -> crate::chain::keysinterface::ChannelKeys {
775+
pub extern "C" fn InMemoryChannelKeys_as_ChannelKeys(this_arg: &InMemoryChannelKeys) -> crate::chain::keysinterface::ChannelKeys {
776776
crate::chain::keysinterface::ChannelKeys {
777777
this_arg: unsafe { (*this_arg).inner as *mut c_void },
778778
free: None,
@@ -864,7 +864,7 @@ extern "C" fn InMemoryChannelKeys_ChannelKeys_ready_channel(this_arg: *mut c_voi
864864
}
865865

866866
#[no_mangle]
867-
pub extern "C" fn InMemoryChannelKeys_write(obj: *const InMemoryChannelKeys) -> crate::c_types::derived::CVec_u8Z {
867+
pub extern "C" fn InMemoryChannelKeys_write(obj: &InMemoryChannelKeys) -> crate::c_types::derived::CVec_u8Z {
868868
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
869869
}
870870
#[no_mangle]
@@ -970,7 +970,7 @@ impl From<nativeKeysManager> for crate::chain::keysinterface::KeysInterface {
970970
}
971971
}
972972
#[no_mangle]
973-
pub extern "C" fn KeysManager_as_KeysInterface(this_arg: *const KeysManager) -> crate::chain::keysinterface::KeysInterface {
973+
pub extern "C" fn KeysManager_as_KeysInterface(this_arg: &KeysManager) -> crate::chain::keysinterface::KeysInterface {
974974
crate::chain::keysinterface::KeysInterface {
975975
this_arg: unsafe { (*this_arg).inner as *mut c_void },
976976
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: 8 additions & 8 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]
@@ -363,7 +363,7 @@ pub extern "C" fn ChannelPublicKeys_new(mut funding_pubkey_arg: crate::c_types::
363363
})), is_owned: true }
364364
}
365365
#[no_mangle]
366-
pub extern "C" fn ChannelPublicKeys_write(obj: *const ChannelPublicKeys) -> crate::c_types::derived::CVec_u8Z {
366+
pub extern "C" fn ChannelPublicKeys_write(obj: &ChannelPublicKeys) -> crate::c_types::derived::CVec_u8Z {
367367
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
368368
}
369369
#[no_mangle]
@@ -515,7 +515,7 @@ pub extern "C" fn HTLCOutputInCommitment_set_payment_hash(this_ptr: &mut HTLCOut
515515
unsafe { &mut *this_ptr.inner }.payment_hash = ::lightning::ln::channelmanager::PaymentHash(val.data);
516516
}
517517
#[no_mangle]
518-
pub extern "C" fn HTLCOutputInCommitment_write(obj: *const HTLCOutputInCommitment) -> crate::c_types::derived::CVec_u8Z {
518+
pub extern "C" fn HTLCOutputInCommitment_write(obj: &HTLCOutputInCommitment) -> crate::c_types::derived::CVec_u8Z {
519519
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
520520
}
521521
#[no_mangle]
@@ -805,7 +805,7 @@ pub extern "C" fn ChannelTransactionParameters_as_counterparty_broadcastable(thi
805805
}
806806

807807
#[no_mangle]
808-
pub extern "C" fn CounterpartyChannelTransactionParameters_write(obj: *const CounterpartyChannelTransactionParameters) -> crate::c_types::derived::CVec_u8Z {
808+
pub extern "C" fn CounterpartyChannelTransactionParameters_write(obj: &CounterpartyChannelTransactionParameters) -> crate::c_types::derived::CVec_u8Z {
809809
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
810810
}
811811
#[no_mangle]
@@ -821,7 +821,7 @@ pub extern "C" fn CounterpartyChannelTransactionParameters_read(ser: crate::c_ty
821821
}
822822
}
823823
#[no_mangle]
824-
pub extern "C" fn ChannelTransactionParameters_write(obj: *const ChannelTransactionParameters) -> crate::c_types::derived::CVec_u8Z {
824+
pub extern "C" fn ChannelTransactionParameters_write(obj: &ChannelTransactionParameters) -> crate::c_types::derived::CVec_u8Z {
825825
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
826826
}
827827
#[no_mangle]
@@ -997,7 +997,7 @@ pub extern "C" fn HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_pt
997997
unsafe { &mut *this_ptr.inner }.counterparty_htlc_sigs = local_val;
998998
}
999999
#[no_mangle]
1000-
pub extern "C" fn HolderCommitmentTransaction_write(obj: *const HolderCommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
1000+
pub extern "C" fn HolderCommitmentTransaction_write(obj: &HolderCommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
10011001
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
10021002
}
10031003
#[no_mangle]
@@ -1115,7 +1115,7 @@ pub extern "C" fn BuiltCommitmentTransaction_new(mut transaction_arg: crate::c_t
11151115
})), is_owned: true }
11161116
}
11171117
#[no_mangle]
1118-
pub extern "C" fn BuiltCommitmentTransaction_write(obj: *const BuiltCommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
1118+
pub extern "C" fn BuiltCommitmentTransaction_write(obj: &BuiltCommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
11191119
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
11201120
}
11211121
#[no_mangle]
@@ -1210,7 +1210,7 @@ pub extern "C" fn CommitmentTransaction_clone(orig: &CommitmentTransaction) -> C
12101210
CommitmentTransaction { inner: Box::into_raw(Box::new(unsafe { &*orig.inner }.clone())), is_owned: true }
12111211
}
12121212
#[no_mangle]
1213-
pub extern "C" fn CommitmentTransaction_write(obj: *const CommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
1213+
pub extern "C" fn CommitmentTransaction_write(obj: &CommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
12141214
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
12151215
}
12161216
#[no_mangle]

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ impl From<nativeChannelManager> for crate::util::events::MessageSendEventsProvid
570570
}
571571
}
572572
#[no_mangle]
573-
pub extern "C" fn ChannelManager_as_MessageSendEventsProvider(this_arg: *const ChannelManager) -> crate::util::events::MessageSendEventsProvider {
573+
pub extern "C" fn ChannelManager_as_MessageSendEventsProvider(this_arg: &ChannelManager) -> crate::util::events::MessageSendEventsProvider {
574574
crate::util::events::MessageSendEventsProvider {
575575
this_arg: unsafe { (*this_arg).inner as *mut c_void },
576576
free: None,
@@ -596,7 +596,7 @@ impl From<nativeChannelManager> for crate::util::events::EventsProvider {
596596
}
597597
}
598598
#[no_mangle]
599-
pub extern "C" fn ChannelManager_as_EventsProvider(this_arg: *const ChannelManager) -> crate::util::events::EventsProvider {
599+
pub extern "C" fn ChannelManager_as_EventsProvider(this_arg: &ChannelManager) -> crate::util::events::EventsProvider {
600600
crate::util::events::EventsProvider {
601601
this_arg: unsafe { (*this_arg).inner as *mut c_void },
602602
free: None,
@@ -638,7 +638,7 @@ impl From<nativeChannelManager> for crate::ln::msgs::ChannelMessageHandler {
638638
}
639639
}
640640
#[no_mangle]
641-
pub extern "C" fn ChannelManager_as_ChannelMessageHandler(this_arg: *const ChannelManager) -> crate::ln::msgs::ChannelMessageHandler {
641+
pub extern "C" fn ChannelManager_as_ChannelMessageHandler(this_arg: &ChannelManager) -> crate::ln::msgs::ChannelMessageHandler {
642642
crate::ln::msgs::ChannelMessageHandler {
643643
this_arg: unsafe { (*this_arg).inner as *mut c_void },
644644
free: None,
@@ -735,7 +735,7 @@ extern "C" fn ChannelManager_ChannelMessageHandler_get_and_clear_pending_msg_eve
735735
}
736736

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

0 commit comments

Comments
 (0)