Skip to content

Commit 7fa1588

Browse files
committed
[bindings] update generated code
1 parent 755dd5a commit 7fa1588

File tree

2 files changed

+22
-44
lines changed

2 files changed

+22
-44
lines changed

lightning-c-bindings/include/lightning.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ typedef struct LDKTxOut {
220220
} LDKTxOut;
221221

222222
typedef struct LDKC2TupleTempl_usize__Transaction {
223-
uintptr_t *a;
224-
LDKTransaction *b;
223+
uintptr_t a;
224+
LDKTransaction b;
225225
} LDKC2TupleTempl_usize__Transaction;
226226

227227
typedef LDKC2TupleTempl_usize__Transaction LDKC2Tuple_usizeTransactionZ;
@@ -286,8 +286,8 @@ typedef struct MUST_USE_STRUCT LDKOutPoint {
286286
} LDKOutPoint;
287287

288288
typedef struct LDKC2TupleTempl_OutPoint__CVec_u8Z {
289-
LDKOutPoint *a;
290-
LDKCVec_u8Z *b;
289+
LDKOutPoint a;
290+
LDKCVec_u8Z b;
291291
} LDKC2TupleTempl_OutPoint__CVec_u8Z;
292292

293293
typedef LDKC2TupleTempl_OutPoint__CVec_u8Z LDKC2Tuple_OutPointScriptZ;
@@ -306,17 +306,17 @@ typedef struct LDKCVecTempl_TxOut {
306306
} LDKCVecTempl_TxOut;
307307

308308
typedef struct LDKC2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut {
309-
LDKThirtyTwoBytes *a;
310-
LDKCVecTempl_TxOut *b;
309+
LDKThirtyTwoBytes a;
310+
LDKCVecTempl_TxOut b;
311311
} LDKC2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut;
312312

313313
typedef LDKC2TupleTempl_ThirtyTwoBytes__CVecTempl_TxOut LDKC2Tuple_TxidCVec_TxOutZZ;
314314

315315
typedef LDKCVecTempl_TxOut LDKCVec_TxOutZ;
316316

317317
typedef struct LDKC2TupleTempl_u64__u64 {
318-
uint64_t *a;
319-
uint64_t *b;
318+
uint64_t a;
319+
uint64_t b;
320320
} LDKC2TupleTempl_u64__u64;
321321

322322
typedef LDKC2TupleTempl_u64__u64 LDKC2Tuple_u64u64Z;
@@ -331,8 +331,8 @@ typedef struct LDKCVecTempl_Signature {
331331
} LDKCVecTempl_Signature;
332332

333333
typedef struct LDKC2TupleTempl_Signature__CVecTempl_Signature {
334-
LDKSignature *a;
335-
LDKCVecTempl_Signature *b;
334+
LDKSignature a;
335+
LDKCVecTempl_Signature b;
336336
} LDKC2TupleTempl_Signature__CVecTempl_Signature;
337337

338338
typedef LDKC2TupleTempl_Signature__CVecTempl_Signature LDKC2Tuple_SignatureCVec_SignatureZZ;
@@ -518,9 +518,9 @@ typedef struct MUST_USE_STRUCT LDKChannelUpdate {
518518
} LDKChannelUpdate;
519519

520520
typedef struct LDKC3TupleTempl_ChannelAnnouncement__ChannelUpdate__ChannelUpdate {
521-
LDKChannelAnnouncement *a;
522-
LDKChannelUpdate *b;
523-
LDKChannelUpdate *c;
521+
LDKChannelAnnouncement a;
522+
LDKChannelUpdate b;
523+
LDKChannelUpdate c;
524524
} LDKC3TupleTempl_ChannelAnnouncement__ChannelUpdate__ChannelUpdate;
525525

526526
typedef LDKC3TupleTempl_ChannelAnnouncement__ChannelUpdate__ChannelUpdate LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ;
@@ -570,8 +570,8 @@ typedef struct MUST_USE_STRUCT LDKHTLCOutputInCommitment {
570570
} LDKHTLCOutputInCommitment;
571571

572572
typedef struct LDKC2TupleTempl_HTLCOutputInCommitment__Signature {
573-
LDKHTLCOutputInCommitment *a;
574-
LDKSignature *b;
573+
LDKHTLCOutputInCommitment a;
574+
LDKSignature b;
575575
} LDKC2TupleTempl_HTLCOutputInCommitment__Signature;
576576

577577
typedef LDKC2TupleTempl_HTLCOutputInCommitment__Signature LDKC2Tuple_HTLCOutputInCommitmentSignatureZ;

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]

0 commit comments

Comments
 (0)