Skip to content

Commit 5988789

Browse files
committed
[bindings] update generated code
1 parent 7e18104 commit 5988789

15 files changed

+597
-619
lines changed

lightning-c-bindings/include/lightning.h

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

lightning-c-bindings/include/lightningpp.hpp

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

lightning-c-bindings/src/c_types/derived.rs

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ pub type C2Tuple_usizeTransactionZ = crate::c_types::C2TupleTempl<usize, crate::
1919
pub static C2Tuple_usizeTransactionZ_free: extern "C" fn(C2Tuple_usizeTransactionZ) = crate::c_types::C2TupleTempl_free::<usize, crate::c_types::Transaction>;
2020
#[no_mangle]
2121
pub extern "C" fn C2Tuple_usizeTransactionZ_new(a: usize, b: crate::c_types::Transaction) -> C2Tuple_usizeTransactionZ {
22-
C2Tuple_usizeTransactionZ {
23-
a: Box::into_raw(Box::new(a)),
24-
b: Box::into_raw(Box::new(b)),
25-
}
22+
C2Tuple_usizeTransactionZ { a, b, }
2623
}
2724

2825
#[no_mangle]
@@ -67,10 +64,7 @@ pub type C2Tuple_OutPointScriptZ = crate::c_types::C2TupleTempl<crate::chain::tr
6764
pub static C2Tuple_OutPointScriptZ_free: extern "C" fn(C2Tuple_OutPointScriptZ) = crate::c_types::C2TupleTempl_free::<crate::chain::transaction::OutPoint, crate::c_types::derived::CVec_u8Z>;
6865
#[no_mangle]
6966
pub extern "C" fn C2Tuple_OutPointScriptZ_new(a: crate::chain::transaction::OutPoint, b: crate::c_types::derived::CVec_u8Z) -> C2Tuple_OutPointScriptZ {
70-
C2Tuple_OutPointScriptZ {
71-
a: Box::into_raw(Box::new(a)),
72-
b: Box::into_raw(Box::new(b)),
73-
}
67+
C2Tuple_OutPointScriptZ { a, b, }
7468
}
7569

7670
#[no_mangle]
@@ -89,10 +83,7 @@ pub type C2Tuple_TxidCVec_TxOutZZ = crate::c_types::C2TupleTempl<crate::c_types:
8983
pub static C2Tuple_TxidCVec_TxOutZZ_free: extern "C" fn(C2Tuple_TxidCVec_TxOutZZ) = crate::c_types::C2TupleTempl_free::<crate::c_types::ThirtyTwoBytes, crate::c_types::CVecTempl<crate::c_types::TxOut>>;
9084
#[no_mangle]
9185
pub extern "C" fn C2Tuple_TxidCVec_TxOutZZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::c_types::derived::CVec_TxOutZ) -> C2Tuple_TxidCVec_TxOutZZ {
92-
C2Tuple_TxidCVec_TxOutZZ {
93-
a: Box::into_raw(Box::new(a)),
94-
b: Box::into_raw(Box::new(b)),
95-
}
86+
C2Tuple_TxidCVec_TxOutZZ { a, b, }
9687
}
9788

9889
#[no_mangle]
@@ -106,10 +97,7 @@ pub type C2Tuple_u64u64Z = crate::c_types::C2TupleTempl<u64, u64>;
10697
pub static C2Tuple_u64u64Z_free: extern "C" fn(C2Tuple_u64u64Z) = crate::c_types::C2TupleTempl_free::<u64, u64>;
10798
#[no_mangle]
10899
pub extern "C" fn C2Tuple_u64u64Z_new(a: u64, b: u64) -> C2Tuple_u64u64Z {
109-
C2Tuple_u64u64Z {
110-
a: Box::into_raw(Box::new(a)),
111-
b: Box::into_raw(Box::new(b)),
112-
}
100+
C2Tuple_u64u64Z { a, b, }
113101
}
114102

115103
#[no_mangle]
@@ -128,10 +116,7 @@ pub type C2Tuple_SignatureCVec_SignatureZZ = crate::c_types::C2TupleTempl<crate:
128116
pub static C2Tuple_SignatureCVec_SignatureZZ_free: extern "C" fn(C2Tuple_SignatureCVec_SignatureZZ) = crate::c_types::C2TupleTempl_free::<crate::c_types::Signature, crate::c_types::CVecTempl<crate::c_types::Signature>>;
129117
#[no_mangle]
130118
pub extern "C" fn C2Tuple_SignatureCVec_SignatureZZ_new(a: crate::c_types::Signature, b: crate::c_types::derived::CVec_SignatureZ) -> C2Tuple_SignatureCVec_SignatureZZ {
131-
C2Tuple_SignatureCVec_SignatureZZ {
132-
a: Box::into_raw(Box::new(a)),
133-
b: Box::into_raw(Box::new(b)),
134-
}
119+
C2Tuple_SignatureCVec_SignatureZZ { a, b, }
135120
}
136121

137122
#[no_mangle]
@@ -269,11 +254,7 @@ pub type C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ = crate::c_types
269254
pub static C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free: extern "C" fn(C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) = crate::c_types::C3TupleTempl_free::<crate::ln::msgs::ChannelAnnouncement, crate::ln::msgs::ChannelUpdate, crate::ln::msgs::ChannelUpdate>;
270255
#[no_mangle]
271256
pub extern "C" fn C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: crate::ln::msgs::ChannelAnnouncement, b: crate::ln::msgs::ChannelUpdate, c: crate::ln::msgs::ChannelUpdate) -> C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ {
272-
C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ {
273-
a: Box::into_raw(Box::new(a)),
274-
b: Box::into_raw(Box::new(b)),
275-
c: Box::into_raw(Box::new(c)),
276-
}
257+
C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ { a, b, c, }
277258
}
278259

279260
#[no_mangle]
@@ -375,10 +356,7 @@ pub type C2Tuple_HTLCOutputInCommitmentSignatureZ = crate::c_types::C2TupleTempl
375356
pub static C2Tuple_HTLCOutputInCommitmentSignatureZ_free: extern "C" fn(C2Tuple_HTLCOutputInCommitmentSignatureZ) = crate::c_types::C2TupleTempl_free::<crate::ln::chan_utils::HTLCOutputInCommitment, crate::c_types::Signature>;
376357
#[no_mangle]
377358
pub extern "C" fn C2Tuple_HTLCOutputInCommitmentSignatureZ_new(a: crate::ln::chan_utils::HTLCOutputInCommitment, b: crate::c_types::Signature) -> C2Tuple_HTLCOutputInCommitmentSignatureZ {
378-
C2Tuple_HTLCOutputInCommitmentSignatureZ {
379-
a: Box::into_raw(Box::new(a)),
380-
b: Box::into_raw(Box::new(b)),
381-
}
359+
C2Tuple_HTLCOutputInCommitmentSignatureZ { a, b, }
382360
}
383361

384362
#[no_mangle]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type nativeChainMonitor = nativeChainMonitorImport<crate::chain::keysinterface::
4141
#[must_use]
4242
#[repr(C)]
4343
pub struct ChainMonitor {
44-
/// Nearly everyhwere, inner must be non-null, however in places where
44+
/// Nearly everywhere, inner must be non-null, however in places where
4545
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
4646
pub inner: *mut nativeChainMonitor,
4747
pub is_owned: bool,

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type nativeChannelMonitorUpdate = nativeChannelMonitorUpdateImport;
2626
#[must_use]
2727
#[repr(C)]
2828
pub struct ChannelMonitorUpdate {
29-
/// Nearly everyhwere, inner must be non-null, however in places where
29+
/// Nearly everywhere, inner must be non-null, however in places where
3030
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
3131
pub inner: *mut nativeChannelMonitorUpdate,
3232
pub is_owned: bool,
@@ -209,7 +209,7 @@ type nativeMonitorUpdateError = nativeMonitorUpdateErrorImport;
209209
#[must_use]
210210
#[repr(C)]
211211
pub struct MonitorUpdateError {
212-
/// Nearly everyhwere, inner must be non-null, however in places where
212+
/// Nearly everywhere, inner must be non-null, however in places where
213213
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
214214
pub inner: *mut nativeMonitorUpdateError,
215215
pub is_owned: bool,
@@ -247,7 +247,7 @@ type nativeMonitorEvent = nativeMonitorEventImport;
247247
#[must_use]
248248
#[repr(C)]
249249
pub struct MonitorEvent {
250-
/// Nearly everyhwere, inner must be non-null, however in places where
250+
/// Nearly everywhere, inner must be non-null, however in places where
251251
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
252252
pub inner: *mut nativeMonitorEvent,
253253
pub is_owned: bool,
@@ -289,7 +289,7 @@ type nativeHTLCUpdate = nativeHTLCUpdateImport;
289289
#[must_use]
290290
#[repr(C)]
291291
pub struct HTLCUpdate {
292-
/// Nearly everyhwere, inner must be non-null, however in places where
292+
/// Nearly everywhere, inner must be non-null, however in places where
293293
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
294294
pub inner: *mut nativeHTLCUpdate,
295295
pub is_owned: bool,
@@ -361,7 +361,7 @@ type nativeChannelMonitor = nativeChannelMonitorImport<crate::chain::keysinterfa
361361
#[must_use]
362362
#[repr(C)]
363363
pub struct ChannelMonitor {
364-
/// Nearly everyhwere, inner must be non-null, however in places where
364+
/// Nearly everywhere, inner must be non-null, however in places where
365365
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
366366
pub inner: *mut nativeChannelMonitor,
367367
pub is_owned: bool,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ type nativeInMemoryChannelKeys = nativeInMemoryChannelKeysImport;
548548
#[must_use]
549549
#[repr(C)]
550550
pub struct InMemoryChannelKeys {
551-
/// Nearly everyhwere, inner must be non-null, however in places where
551+
/// Nearly everywhere, inner must be non-null, however in places where
552552
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
553553
pub inner: *mut nativeInMemoryChannelKeys,
554554
pub is_owned: bool,
@@ -823,7 +823,7 @@ type nativeKeysManager = nativeKeysManagerImport;
823823
#[must_use]
824824
#[repr(C)]
825825
pub struct KeysManager {
826-
/// Nearly everyhwere, inner must be non-null, however in places where
826+
/// Nearly everywhere, inner must be non-null, however in places where
827827
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
828828
pub inner: *mut nativeKeysManager,
829829
pub is_owned: bool,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type nativeOutPoint = nativeOutPointImport;
1515
#[must_use]
1616
#[repr(C)]
1717
pub struct OutPoint {
18-
/// Nearly everyhwere, inner must be non-null, however in places where
18+
/// Nearly everywhere, inner must be non-null, however in places where
1919
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
2020
pub inner: *mut nativeOutPoint,
2121
pub is_owned: bool,

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ type nativeTxCreationKeys = nativeTxCreationKeysImport;
9090
#[must_use]
9191
#[repr(C)]
9292
pub struct TxCreationKeys {
93-
/// Nearly everyhwere, inner must be non-null, however in places where
93+
/// Nearly everywhere, inner must be non-null, however in places where
9494
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
9595
pub inner: *mut nativeTxCreationKeys,
9696
pub is_owned: bool,
@@ -226,7 +226,7 @@ type nativePreCalculatedTxCreationKeys = nativePreCalculatedTxCreationKeysImport
226226
#[must_use]
227227
#[repr(C)]
228228
pub struct PreCalculatedTxCreationKeys {
229-
/// Nearly everyhwere, inner must be non-null, however in places where
229+
/// Nearly everywhere, inner must be non-null, however in places where
230230
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
231231
pub inner: *mut nativePreCalculatedTxCreationKeys,
232232
pub is_owned: bool,
@@ -289,7 +289,7 @@ type nativeChannelPublicKeys = nativeChannelPublicKeysImport;
289289
#[must_use]
290290
#[repr(C)]
291291
pub struct ChannelPublicKeys {
292-
/// Nearly everyhwere, inner must be non-null, however in places where
292+
/// Nearly everywhere, inner must be non-null, however in places where
293293
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
294294
pub inner: *mut nativeChannelPublicKeys,
295295
pub is_owned: bool,
@@ -454,7 +454,7 @@ type nativeHTLCOutputInCommitment = nativeHTLCOutputInCommitmentImport;
454454
#[must_use]
455455
#[repr(C)]
456456
pub struct HTLCOutputInCommitment {
457-
/// Nearly everyhwere, inner must be non-null, however in places where
457+
/// Nearly everywhere, inner must be non-null, however in places where
458458
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
459459
pub inner: *mut nativeHTLCOutputInCommitment,
460460
pub is_owned: bool,
@@ -595,7 +595,7 @@ type nativeHolderCommitmentTransaction = nativeHolderCommitmentTransactionImport
595595
#[must_use]
596596
#[repr(C)]
597597
pub struct HolderCommitmentTransaction {
598-
/// Nearly everyhwere, inner must be non-null, however in places where
598+
/// Nearly everywhere, inner must be non-null, however in places where
599599
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
600600
pub inner: *mut nativeHolderCommitmentTransaction,
601601
pub is_owned: bool,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ type nativeChannelManager = nativeChannelManagerImport<crate::chain::keysinterfa
5656
#[must_use]
5757
#[repr(C)]
5858
pub struct ChannelManager {
59-
/// Nearly everyhwere, inner must be non-null, however in places where
59+
/// Nearly everywhere, inner must be non-null, however in places where
6060
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
6161
pub inner: *mut nativeChannelManager,
6262
pub is_owned: bool,
@@ -94,7 +94,7 @@ type nativeChannelDetails = nativeChannelDetailsImport;
9494
#[must_use]
9595
#[repr(C)]
9696
pub struct ChannelDetails {
97-
/// Nearly everyhwere, inner must be non-null, however in places where
97+
/// Nearly everywhere, inner must be non-null, however in places where
9898
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
9999
pub inner: *mut nativeChannelDetails,
100100
pub is_owned: bool,
@@ -248,7 +248,7 @@ type nativePaymentSendFailure = nativePaymentSendFailureImport;
248248
#[must_use]
249249
#[repr(C)]
250250
pub struct PaymentSendFailure {
251-
/// Nearly everyhwere, inner must be non-null, however in places where
251+
/// Nearly everywhere, inner must be non-null, however in places where
252252
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
253253
pub inner: *mut nativePaymentSendFailure,
254254
pub is_owned: bool,
@@ -705,7 +705,7 @@ type nativeChannelManagerReadArgs = nativeChannelManagerReadArgsImport<'static,
705705
#[must_use]
706706
#[repr(C)]
707707
pub struct ChannelManagerReadArgs {
708-
/// Nearly everyhwere, inner must be non-null, however in places where
708+
/// Nearly everywhere, inner must be non-null, however in places where
709709
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
710710
pub inner: *mut nativeChannelManagerReadArgs,
711711
pub is_owned: bool,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type nativeInitFeatures = nativeInitFeaturesImport;
2828
#[must_use]
2929
#[repr(C)]
3030
pub struct InitFeatures {
31-
/// Nearly everyhwere, inner must be non-null, however in places where
31+
/// Nearly everywhere, inner must be non-null, however in places where
3232
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
3333
pub inner: *mut nativeInitFeatures,
3434
pub is_owned: bool,
@@ -66,7 +66,7 @@ type nativeNodeFeatures = nativeNodeFeaturesImport;
6666
#[must_use]
6767
#[repr(C)]
6868
pub struct NodeFeatures {
69-
/// Nearly everyhwere, inner must be non-null, however in places where
69+
/// Nearly everywhere, inner must be non-null, however in places where
7070
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
7171
pub inner: *mut nativeNodeFeatures,
7272
pub is_owned: bool,
@@ -104,7 +104,7 @@ type nativeChannelFeatures = nativeChannelFeaturesImport;
104104
#[must_use]
105105
#[repr(C)]
106106
pub struct ChannelFeatures {
107-
/// Nearly everyhwere, inner must be non-null, however in places where
107+
/// Nearly everywhere, inner must be non-null, however in places where
108108
/// the Rust equivalent takes an Option, it may be set to null to indicate None.
109109
pub inner: *mut nativeChannelFeatures,
110110
pub is_owned: bool,

0 commit comments

Comments
 (0)