Skip to content

Commit 2c965bf

Browse files
committed
Regenerate Swift files.
1 parent bdf5e83 commit 2c965bf

28 files changed

+4774
-3655
lines changed

ci/LDKSwift/Sources/LDKSwift/bindings/Bindings.swift

Lines changed: 113 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,108 +1016,6 @@ public class Bindings {
10161016
}
10171017

10181018

1019-
/* SWIFT_TO_RUST_START */
1020-
public class func new_LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZWrapper(array: [LDKC2Tuple_OutPointCVec_MonitorEventZZ]) -> LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZWrapper {
1021-
/* DIMENSION_REDUCTION_PREP */
1022-
1023-
/*
1024-
let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer<LDKC2Tuple_OutPointCVec_MonitorEventZZ>) -> UnsafeMutablePointer<LDKC2Tuple_OutPointCVec_MonitorEventZZ> in
1025-
let mutablePointer = UnsafeMutablePointer<LDKC2Tuple_OutPointCVec_MonitorEventZZ>(mutating: pointer.baseAddress!)
1026-
return mutablePointer
1027-
}
1028-
*/
1029-
1030-
let dataContainer = UnsafeMutablePointer<LDKC2Tuple_OutPointCVec_MonitorEventZZ>.allocate(capacity: array.count)
1031-
dataContainer.initialize(from: array, count: array.count)
1032-
1033-
let vector = LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ(data: dataContainer, datalen: UInt(array.count))
1034-
let wrapper = LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZWrapper(pointer: vector)
1035-
return wrapper
1036-
}
1037-
1038-
public class LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZWrapper: NativeTypeWrapper {
1039-
private static var instanceCounter: UInt = 0
1040-
internal let instanceNumber: UInt
1041-
1042-
internal var cOpaqueStruct: LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ?
1043-
internal var subdimensionWrapper: [AnyObject]? = nil
1044-
1045-
public init(pointer: LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ){
1046-
Self.instanceCounter += 1
1047-
self.instanceNumber = Self.instanceCounter
1048-
self.cOpaqueStruct = pointer
1049-
super.init(conflictAvoidingVariableName: 0)
1050-
}
1051-
1052-
internal init(pointer: LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ, subdimensionWrapper: [AnyObject]){
1053-
Self.instanceCounter += 1
1054-
self.instanceNumber = Self.instanceCounter
1055-
self.subdimensionWrapper = subdimensionWrapper
1056-
self.cOpaqueStruct = pointer
1057-
super.init(conflictAvoidingVariableName: 0)
1058-
}
1059-
1060-
public func noOpRetain(){}
1061-
1062-
internal func dangle(dangleSubdimensions: Bool = true) -> LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZWrapper {
1063-
self.dangling = true
1064-
/* SUBDIMENSION_DANGLE_PREP */
1065-
return self
1066-
}
1067-
1068-
deinit {
1069-
if !self.dangling {
1070-
print("Freeing LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZWrapper \(self.instanceNumber).")
1071-
self.cOpaqueStruct!.data.deallocate()
1072-
} else {
1073-
print("Not freeing LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZWrapper \(self.instanceNumber) due to dangle.")
1074-
}
1075-
}
1076-
}
1077-
/* SWIFT_TO_RUST_END */
1078-
1079-
/* RUST_TO_SWIFT_START */
1080-
public class func LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ_to_array(nativeType: LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ, deallocate: Bool = true) -> [LDKC2Tuple_OutPointCVec_MonitorEventZZ] {
1081-
var array = [LDKC2Tuple_OutPointCVec_MonitorEventZZ]()
1082-
for index in 0..<Int(nativeType.datalen) {
1083-
let currentEntry = nativeType.data[index]
1084-
/* CONVERSION_PREP */
1085-
array.append(currentEntry)
1086-
}
1087-
1088-
if deallocate && nativeType.datalen > 0 {
1089-
nativeType.data.deallocate()
1090-
}
1091-
1092-
return array
1093-
}
1094-
/* RUST_TO_SWIFT_END */
1095-
public class func extractNativeLDKC2Tuple_OutPointCVec_MonitorEventZZArray(array: [C2Tuple_OutPointCVec_MonitorEventZZ]) -> [LDKC2Tuple_OutPointCVec_MonitorEventZZ] {
1096-
return array.map { entry -> LDKC2Tuple_OutPointCVec_MonitorEventZZ in
1097-
entry.danglingClone().cOpaqueStruct!
1098-
}
1099-
}
1100-
1101-
public class func wrapNativeLDKC2Tuple_OutPointCVec_MonitorEventZZArray(array: [LDKC2Tuple_OutPointCVec_MonitorEventZZ]) -> [C2Tuple_OutPointCVec_MonitorEventZZ] {
1102-
return array.map { entry -> C2Tuple_OutPointCVec_MonitorEventZZ in
1103-
C2Tuple_OutPointCVec_MonitorEventZZ(pointer: entry)
1104-
}
1105-
}
1106-
1107-
public class func wrapDanglingNativeLDKC2Tuple_OutPointCVec_MonitorEventZZArray(array: [LDKC2Tuple_OutPointCVec_MonitorEventZZ]) -> [C2Tuple_OutPointCVec_MonitorEventZZ] {
1108-
return array.map { entry -> C2Tuple_OutPointCVec_MonitorEventZZ in
1109-
C2Tuple_OutPointCVec_MonitorEventZZ(pointer: entry).dangle()
1110-
}
1111-
}
1112-
1113-
internal class func cloneNativeLDKC2Tuple_OutPointCVec_MonitorEventZZArray(array: [LDKC2Tuple_OutPointCVec_MonitorEventZZ]) -> [LDKC2Tuple_OutPointCVec_MonitorEventZZ] {
1114-
return array.map { entry -> LDKC2Tuple_OutPointCVec_MonitorEventZZ in
1115-
// create a wrapper around the native object, dangle it to make it non-destructive, clone it, and then dangle the clone
1116-
C2Tuple_OutPointCVec_MonitorEventZZ(pointer: entry).dangle().clone().dangle().cOpaqueStruct!
1117-
}
1118-
}
1119-
1120-
11211019
/* SWIFT_TO_RUST_START */
11221020
public class func new_LDKCVec_C2Tuple_PublicKeyTypeZZWrapper(array: [LDKC2Tuple_PublicKeyTypeZ]) -> LDKCVec_C2Tuple_PublicKeyTypeZZWrapper {
11231021
/* DIMENSION_REDUCTION_PREP */
@@ -1730,6 +1628,108 @@ public class Bindings {
17301628
}
17311629

17321630

1631+
/* SWIFT_TO_RUST_START */
1632+
public class func new_LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZWrapper(array: [LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ]) -> LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZWrapper {
1633+
/* DIMENSION_REDUCTION_PREP */
1634+
1635+
/*
1636+
let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer<LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ>) -> UnsafeMutablePointer<LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ> in
1637+
let mutablePointer = UnsafeMutablePointer<LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ>(mutating: pointer.baseAddress!)
1638+
return mutablePointer
1639+
}
1640+
*/
1641+
1642+
let dataContainer = UnsafeMutablePointer<LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ>.allocate(capacity: array.count)
1643+
dataContainer.initialize(from: array, count: array.count)
1644+
1645+
let vector = LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ(data: dataContainer, datalen: UInt(array.count))
1646+
let wrapper = LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZWrapper(pointer: vector)
1647+
return wrapper
1648+
}
1649+
1650+
public class LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZWrapper: NativeTypeWrapper {
1651+
private static var instanceCounter: UInt = 0
1652+
internal let instanceNumber: UInt
1653+
1654+
internal var cOpaqueStruct: LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ?
1655+
internal var subdimensionWrapper: [AnyObject]? = nil
1656+
1657+
public init(pointer: LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ){
1658+
Self.instanceCounter += 1
1659+
self.instanceNumber = Self.instanceCounter
1660+
self.cOpaqueStruct = pointer
1661+
super.init(conflictAvoidingVariableName: 0)
1662+
}
1663+
1664+
internal init(pointer: LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ, subdimensionWrapper: [AnyObject]){
1665+
Self.instanceCounter += 1
1666+
self.instanceNumber = Self.instanceCounter
1667+
self.subdimensionWrapper = subdimensionWrapper
1668+
self.cOpaqueStruct = pointer
1669+
super.init(conflictAvoidingVariableName: 0)
1670+
}
1671+
1672+
public func noOpRetain(){}
1673+
1674+
internal func dangle(dangleSubdimensions: Bool = true) -> LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZWrapper {
1675+
self.dangling = true
1676+
/* SUBDIMENSION_DANGLE_PREP */
1677+
return self
1678+
}
1679+
1680+
deinit {
1681+
if !self.dangling {
1682+
print("Freeing LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZWrapper \(self.instanceNumber).")
1683+
self.cOpaqueStruct!.data.deallocate()
1684+
} else {
1685+
print("Not freeing LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZWrapper \(self.instanceNumber) due to dangle.")
1686+
}
1687+
}
1688+
}
1689+
/* SWIFT_TO_RUST_END */
1690+
1691+
/* RUST_TO_SWIFT_START */
1692+
public class func LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ_to_array(nativeType: LDKCVec_C3Tuple_OutPointCVec_MonitorEventZPublicKeyZZ, deallocate: Bool = true) -> [LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ] {
1693+
var array = [LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ]()
1694+
for index in 0..<Int(nativeType.datalen) {
1695+
let currentEntry = nativeType.data[index]
1696+
/* CONVERSION_PREP */
1697+
array.append(currentEntry)
1698+
}
1699+
1700+
if deallocate && nativeType.datalen > 0 {
1701+
nativeType.data.deallocate()
1702+
}
1703+
1704+
return array
1705+
}
1706+
/* RUST_TO_SWIFT_END */
1707+
public class func extractNativeLDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZArray(array: [C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ]) -> [LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ] {
1708+
return array.map { entry -> LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ in
1709+
entry.danglingClone().cOpaqueStruct!
1710+
}
1711+
}
1712+
1713+
public class func wrapNativeLDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZArray(array: [LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ]) -> [C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ] {
1714+
return array.map { entry -> C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ in
1715+
C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ(pointer: entry)
1716+
}
1717+
}
1718+
1719+
public class func wrapDanglingNativeLDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZArray(array: [LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ]) -> [C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ] {
1720+
return array.map { entry -> C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ in
1721+
C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ(pointer: entry).dangle()
1722+
}
1723+
}
1724+
1725+
internal class func cloneNativeLDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZArray(array: [LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ]) -> [LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ] {
1726+
return array.map { entry -> LDKC3Tuple_OutPointCVec_MonitorEventZPublicKeyZ in
1727+
// create a wrapper around the native object, dangle it to make it non-destructive, clone it, and then dangle the clone
1728+
C3Tuple_OutPointCVec_MonitorEventZPublicKeyZ(pointer: entry).dangle().clone().dangle().cOpaqueStruct!
1729+
}
1730+
}
1731+
1732+
17331733
/* SWIFT_TO_RUST_START */
17341734
public class func new_LDKCVec_CResult_NoneAPIErrorZZWrapper(array: [LDKCResult_NoneAPIErrorZ]) -> LDKCVec_CResult_NoneAPIErrorZZWrapper {
17351735
/* DIMENSION_REDUCTION_PREP */
@@ -5278,6 +5278,16 @@ public class Bindings {
52785278

52795279
CResult_COption_ClosureReasonZDecodeErrorZ_is_ok(oPointer)
52805280

5281+
}
5282+
5283+
}
5284+
public class func swift_CResult_COption_HTLCDestinationZDecodeErrorZ_is_ok(o: Result_COption_HTLCDestinationZDecodeErrorZ) -> Bool {
5285+
5286+
5287+
return withUnsafePointer(to: o.cOpaqueStruct!) { (oPointer: UnsafePointer<LDKCResult_COption_HTLCDestinationZDecodeErrorZ>) in
5288+
5289+
CResult_COption_HTLCDestinationZDecodeErrorZ_is_ok(oPointer)
5290+
52815291
}
52825292

52835293
}
@@ -6922,7 +6932,7 @@ withUnsafePointer(to: Bindings.array_to_tuple32(array: random_seed_bytes)) { (ra
69226932
*/
69236933

69246934
public class func get_ldk_swift_bindings_version() -> String {
6925-
return "bf16d08dc0183ae1d6b43c89990a25182f754675"
6935+
return "bdf5e832523c31577a5d8019c136c806d7e1337e"
69266936
}
69276937

69286938
}

0 commit comments

Comments
 (0)