From 539df092e3899eb12a3930abe973194283c0b477 Mon Sep 17 00:00:00 2001
From: Li Feng
Date: Thu, 29 Aug 2024 15:07:39 +1000
Subject: [PATCH] fixes
---
.../swift/ItemList+Private.swift | 8 +-
.../swift/SortItems+Private.swift | 34 +-
.../swift/SortOrder+Private.swift | 2 +-
.../swift/TextboxListener+Private.swift | 8 +-
src/source/SwiftMarshal.scala | 4 +-
.../djinni/vendor/third-party/date.yaml | 2 +-
.../djinni/vendor/third-party/duration.yaml | 7 +
.../swift/AccessFlags+Private.swift | 2 +-
.../swift/AssortedPrimitives+Private.swift | 8 +-
.../swift/AsyncInterface+Private.swift | 12 +-
.../generated-src/swift/AsyncInterface.swift | 2 +-
.../swift/ClientInterface+Private.swift | 8 +-
.../swift/ClientReturnedRecord+Private.swift | 8 +-
.../generated-src/swift/Color+Private.swift | 2 +-
.../swift/Conflict+Private.swift | 8 +-
.../swift/ConflictUser+Private.swift | 22 +-
.../swift/ConstantEnum+Private.swift | 2 +-
.../ConstantInterfaceWithEnum+Private.swift | 8 +-
.../swift/ConstantRecord+Private.swift | 8 +-
.../swift/ConstantWithEnum+Private.swift | 8 +-
.../swift/Constants+Private.swift | 8 +-
.../swift/ConstantsInterface+Private.swift | 14 +-
.../swift/CppException+Private.swift | 36 +-
.../swift/DataRefTest+Private.swift | 90 ++---
.../generated-src/swift/DataRefTest.swift | 14 +-
.../swift/DateRecord+Private.swift | 8 +-
.../generated-src/swift/DateRecord.swift | 1 -
.../swift/EmptyFlags+Private.swift | 2 +-
.../swift/EmptyRecord+Private.swift | 8 +-
.../swift/EnumUsageInterface+Private.swift | 48 +--
.../swift/EnumUsageRecord+Private.swift | 8 +-
.../swift/ExtendedRecord+Private.swift | 8 +-
.../swift/ExternInterface1+Private.swift | 32 +-
.../swift/ExternInterface1.swift | 4 +-
.../swift/ExternInterface2+Private.swift | 8 +-
.../swift/ExternInterface2.swift | 2 +-
.../ExternRecordWithDerivings+Private.swift | 16 +-
.../swift/ExternRecordWithDerivings.swift | 6 +-
.../swift/FirstListener+Private.swift | 8 +-
.../swift/FlagRoundtrip+Private.swift | 40 +--
...InterfaceUsingExtendedRecord+Private.swift | 16 +-
.../swift/JavaOnlyListener+Private.swift | 8 +-
.../swift/ListenerCaller+Private.swift | 30 +-
.../swift/MapDateRecord+Private.swift | 8 +-
.../generated-src/swift/MapDateRecord.swift | 1 -
.../swift/MapListRecord+Private.swift | 8 +-
.../swift/MapRecord+Private.swift | 8 +-
.../swift/NestedCollection+Private.swift | 8 +-
.../swift/NestedOutcome+Private.swift | 12 +-
.../swift/ObjcOnlyListener+Private.swift | 8 +-
.../swift/PrimitiveList+Private.swift | 8 +-
.../swift/ProtoTests+Private.swift | 114 +++----
.../RecordUsingExtendedRecord+Private.swift | 8 +-
.../swift/RecordWithDerivings+Private.swift | 8 +-
...cordWithDurationAndDerivings+Private.swift | 12 +-
.../RecordWithEmbeddedCppProto+Private.swift | 8 +-
.../RecordWithEmbeddedProto+Private.swift | 8 +-
.../swift/RecordWithFlags+Private.swift | 8 +-
.../RecordWithNestedDerivings+Private.swift | 8 +-
.../swift/ReturnOne+Private.swift | 20 +-
.../swift/ReturnTwo+Private.swift | 20 +-
.../ReverseClientInterface+Private.swift | 36 +-
.../swift/SampleInterface+Private.swift | 8 +-
.../swift/SecondListener+Private.swift | 8 +-
.../swift/SetRecord+Private.swift | 8 +-
.../swift/SupportCopying+Private.swift | 8 +-
.../swift/TestArray+Private.swift | 40 +--
.../swift/TestDuration+Private.swift | 194 +++++------
.../swift/TestHelpers+Private.swift | 312 +++++++++---------
...ptionalExternInterfaceRecord+Private.swift | 12 +-
.../TestOptionalExternInterfaceRecord.swift | 4 +-
.../swift/TestOutcome+Private.swift | 68 ++--
.../TestStaticMethodLanguage+Private.swift | 8 +-
.../swift/ThrowingInterface+Private.swift | 8 +-
.../swift/UserToken+Private.swift | 14 +-
.../UsesSingleLanguageListeners+Private.swift | 36 +-
.../swift/VarnameInterface+Private.swift | 24 +-
.../swift/VarnameRecord+Private.swift | 8 +-
.../generated-src/swift/Vec2+Private.swift | 8 +-
.../swift/WcharTestHelpers+Private.swift | 36 +-
.../swift/WcharTestRec+Private.swift | 8 +-
81 files changed, 853 insertions(+), 848 deletions(-)
diff --git a/examples/generated-src/swift/ItemList+Private.swift b/examples/generated-src/swift/ItemList+Private.swift
index 170259cf..5e3ff565 100644
--- a/examples/generated-src/swift/ItemList+Private.swift
+++ b/examples/generated-src/swift/ItemList+Private.swift
@@ -7,15 +7,15 @@ import Foundation
import TextSort
import TextSortCxx
-enum ItemListMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TextSort.ItemList
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ItemListMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TextSort.ItemList
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let items = ListMarshaller.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(items: items)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, ListMarshaller.toCpp(s.items))
return ret
diff --git a/examples/generated-src/swift/SortItems+Private.swift b/examples/generated-src/swift/SortItems+Private.swift
index 1d64c57f..eed2207a 100644
--- a/examples/generated-src/swift/SortItems+Private.swift
+++ b/examples/generated-src/swift/SortItems+Private.swift
@@ -10,35 +10,35 @@ import TextSortCxx
final class SortItemsCppProxy: DjinniSupport.CppProxy, TextSort.SortItems {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
func sort(_ order: TextSort.SortOrder, items: TextSort.ItemList) throws -> Void {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(SortOrderMarshaller.toCpp(order))
- params.addValue(ItemListMarshaller.toCpp(items))
- var ret = djinni_generated.SortItems_sort(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(SortOrderMarshaller.toCpp(order))
+ _params.addValue(ItemListMarshaller.toCpp(items))
+ var ret = djinni_generated.SortItems_sort(&_params)
try handleCppErrors(&ret)
}
}
-enum SortItemsMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TextSort.SortItems
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum SortItemsMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TextSort.SortItems
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { SortItemsCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
public class SortItems_statics {
- static func createWithListener(_ listener: TextSort.TextboxListener) throws -> TextSort.SortItems {
- var params = djinni.swift.ParameterList()
- params.addValue(TextboxListenerMarshaller.toCpp(listener))
- var ret = djinni_generated.SortItems_createWithListener(¶ms)
+ public static func createWithListener(_ listener: TextSort.TextboxListener) throws -> TextSort.SortItems {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(TextboxListenerMarshaller.toCpp(listener))
+ var ret = djinni_generated.SortItems_createWithListener(&_params)
try handleCppErrors(&ret)
return SortItemsMarshaller.fromCpp(ret)
}
- static func runSort(_ items: TextSort.ItemList) throws -> TextSort.ItemList {
- var params = djinni.swift.ParameterList()
- params.addValue(ItemListMarshaller.toCpp(items))
- var ret = djinni_generated.SortItems_runSort(¶ms)
+ public static func runSort(_ items: TextSort.ItemList) throws -> TextSort.ItemList {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ItemListMarshaller.toCpp(items))
+ var ret = djinni_generated.SortItems_runSort(&_params)
try handleCppErrors(&ret)
return ItemListMarshaller.fromCpp(ret)
}
diff --git a/examples/generated-src/swift/SortOrder+Private.swift b/examples/generated-src/swift/SortOrder+Private.swift
index 0d793a72..31fdf7f4 100644
--- a/examples/generated-src/swift/SortOrder+Private.swift
+++ b/examples/generated-src/swift/SortOrder+Private.swift
@@ -4,4 +4,4 @@
import DjinniSupport
import TextSort
-typealias SortOrderMarshaller = DjinniSupport.EnumMarshaller
+public typealias SortOrderMarshaller = DjinniSupport.EnumMarshaller
diff --git a/examples/generated-src/swift/TextboxListener+Private.swift b/examples/generated-src/swift/TextboxListener+Private.swift
index 5fe251b2..ded4c8f9 100644
--- a/examples/generated-src/swift/TextboxListener+Private.swift
+++ b/examples/generated-src/swift/TextboxListener+Private.swift
@@ -14,12 +14,12 @@ let textboxListenerMethods: Vtbl = [
},
]
-enum TextboxListenerMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TextSort.TextboxListener
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum TextboxListenerMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TextSort.TextboxListener
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { fatalError("n/a") })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { djinni_generated.TextboxListenerSwiftProxy.make(ctxPtr(s, textboxListenerMethods), dispatcherProtocalCall)})
}
}
diff --git a/src/source/SwiftMarshal.scala b/src/source/SwiftMarshal.scala
index c4fcc76d..325864d6 100644
--- a/src/source/SwiftMarshal.scala
+++ b/src/source/SwiftMarshal.scala
@@ -59,7 +59,7 @@ class SwiftMarshal(spec: Spec) extends Marshal(spec) {
case MOptional => throw new AssertionError("nested optional?")
case m => s"Optional<${f(arg)}>"
}
- case e: MExtern => e.swift.module + "." + e.swift.typename + (if (e.swift.generic) args(tm) else "")
+ case e: MExtern => Array(e.swift.module, e.swift.typename).filter(s => !s.isEmpty).mkString(".") + (if (e.swift.generic) args(tm) else "")
case p: MProtobuf => p.body.swift match {
case Some(o) => o.prefix + p.name
case None => p.name
@@ -102,7 +102,7 @@ class SwiftMarshal(spec: Spec) extends Marshal(spec) {
private def helperClass(tm: MExpr): String = helperName(tm) + helperTemplates(tm)
def helperName(tm: MExpr): String = tm.base match {
case d: MDef => helperClass(d.name)
- case e: MExtern => e.swift.translator
+ case e: MExtern => Array(e.swift.translatorModule, e.swift.translator).filter(s => !s.isEmpty).mkString(".")
case o => o match {
case p: MPrimitive => p.idlName match {
case "i8" => "I8Marshaller"
diff --git a/test-suite/djinni/vendor/third-party/date.yaml b/test-suite/djinni/vendor/third-party/date.yaml
index 8ae3858a..185bb592 100644
--- a/test-suite/djinni/vendor/third-party/date.yaml
+++ b/test-suite/djinni/vendor/third-party/date.yaml
@@ -40,7 +40,7 @@ ts:
swift:
typename: 'Date'
translator: 'DateMarshaller'
- module: 'DjinniSupport'
+ translatorModule: 'TestSuite'
swiftxx:
translator: '::djinni::swift::Date'
header: '"djinni_support.hpp"'
diff --git a/test-suite/djinni/vendor/third-party/duration.yaml b/test-suite/djinni/vendor/third-party/duration.yaml
index ad253731..d931bd60 100644
--- a/test-suite/djinni/vendor/third-party/duration.yaml
+++ b/test-suite/djinni/vendor/third-party/duration.yaml
@@ -41,6 +41,7 @@ ts:
swift:
typename: 'Duration'
translator: 'DurationMarshaller'
+ translator.module: 'TestSuite'
swiftxx:
translator: '::djinni::swift::Duration'
header: '"Duration-swift.hpp"'
@@ -83,6 +84,7 @@ ts:
swift:
typename: 'Duration'
translator: 'DurationH'
+ translator.module: 'TestSuite'
swiftxx:
translator: '::djinni::swift::Duration_h'
header: '"Duration-swift.hpp"'
@@ -125,6 +127,7 @@ ts:
swift:
typename: 'Duration'
translator: 'DurationMin'
+ translator.module: 'TestSuite'
swiftxx:
translator: '::djinni::swift::Duration_min'
header: '"Duration-swift.hpp"'
@@ -167,6 +170,7 @@ ts:
swift:
typename: 'Duration'
translator: 'DurationS'
+ translator.module: 'TestSuite'
swiftxx:
translator: '::djinni::swift::Duration_s'
header: '"Duration-swift.hpp"'
@@ -209,6 +213,7 @@ ts:
swift:
typename: 'Duration'
translator: 'DurationMs'
+ translator.module: 'TestSuite'
swiftxx:
translator: '::djinni::swift::Duration_ms'
header: '"Duration-swift.hpp"'
@@ -251,6 +256,7 @@ ts:
swift:
typename: 'Duration'
translator: 'DurationUs'
+ translator.module: 'TestSuite'
swiftxx:
translator: '::djinni::swift::Duration_us'
header: '"Duration-swift.hpp"'
@@ -293,6 +299,7 @@ ts:
swift:
typename: 'Duration'
translator: 'DurationNs'
+ translator.module: 'TestSuite'
swiftxx:
translator: '::djinni::swift::Duration_ns'
header: '"Duration-swift.hpp"'
diff --git a/test-suite/generated-src/swift/AccessFlags+Private.swift b/test-suite/generated-src/swift/AccessFlags+Private.swift
index fdce498d..4b9a1a82 100644
--- a/test-suite/generated-src/swift/AccessFlags+Private.swift
+++ b/test-suite/generated-src/swift/AccessFlags+Private.swift
@@ -4,4 +4,4 @@
import DjinniSupport
import TestSuite
-typealias AccessFlagsMarshaller = DjinniSupport.EnumMarshaller
+public typealias AccessFlagsMarshaller = DjinniSupport.EnumMarshaller
diff --git a/test-suite/generated-src/swift/AssortedPrimitives+Private.swift b/test-suite/generated-src/swift/AssortedPrimitives+Private.swift
index 75c29919..647b4657 100644
--- a/test-suite/generated-src/swift/AssortedPrimitives+Private.swift
+++ b/test-suite/generated-src/swift/AssortedPrimitives+Private.swift
@@ -7,9 +7,9 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum AssortedPrimitivesMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.AssortedPrimitives
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum AssortedPrimitivesMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.AssortedPrimitives
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let b = BoolMarshaller.fromCpp(djinni.swift.getMember(p, 0))
let eight = I8Marshaller.fromCpp(djinni.swift.getMember(p, 1))
@@ -28,7 +28,7 @@ enum AssortedPrimitivesMarshaller: DjinniSupport.Marshaller {
return SwiftType(b: b, eight: eight, sixteen: sixteen, thirtytwo: thirtytwo, sixtyfour: sixtyfour, fthirtytwo: fthirtytwo, fsixtyfour: fsixtyfour, oB: oB, oEight: oEight, oSixteen: oSixteen, oThirtytwo: oThirtytwo, oSixtyfour: oSixtyfour, oFthirtytwo: oFthirtytwo, oFsixtyfour: oFsixtyfour)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, BoolMarshaller.toCpp(s.b))
djinni.swift.addMember(&ret, I8Marshaller.toCpp(s.eight))
diff --git a/test-suite/generated-src/swift/AsyncInterface+Private.swift b/test-suite/generated-src/swift/AsyncInterface+Private.swift
index 348f78a8..f4a86001 100644
--- a/test-suite/generated-src/swift/AsyncInterface+Private.swift
+++ b/test-suite/generated-src/swift/AsyncInterface+Private.swift
@@ -9,17 +9,17 @@ import TestSuiteCxx
let asyncInterfaceMethods: Vtbl = [
{ inst, params, ret in
- let _f = FutureMarshaller.fromCpp(djinni.swift.getMember(params, 0))
- djinni.swift.setReturnValue(ret, try FutureMarshaller.toCpp(inst.futureRoundtrip(_f)))
+ let _f = DjinniSupport.FutureMarshaller.fromCpp(djinni.swift.getMember(params, 0))
+ djinni.swift.setReturnValue(ret, try DjinniSupport.FutureMarshaller.toCpp(inst.futureRoundtrip(_f)))
},
]
-enum AsyncInterfaceMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.AsyncInterface
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum AsyncInterfaceMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.AsyncInterface
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { fatalError("n/a") })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { djinni_generated.AsyncInterfaceSwiftProxy.make(ctxPtr(s, asyncInterfaceMethods), dispatcherProtocalCall)})
}
}
diff --git a/test-suite/generated-src/swift/AsyncInterface.swift b/test-suite/generated-src/swift/AsyncInterface.swift
index c248391d..749fd1eb 100644
--- a/test-suite/generated-src/swift/AsyncInterface.swift
+++ b/test-suite/generated-src/swift/AsyncInterface.swift
@@ -5,5 +5,5 @@ import DjinniSupport
import Foundation
public protocol AsyncInterface: AnyObject {
- func futureRoundtrip(_ f: DJFuture) throws -> DJFuture
+ func futureRoundtrip(_ f: DjinniSupport.DJFuture) throws -> DjinniSupport.DJFuture
}
diff --git a/test-suite/generated-src/swift/ClientInterface+Private.swift b/test-suite/generated-src/swift/ClientInterface+Private.swift
index 516b6cc6..5399ffdd 100644
--- a/test-suite/generated-src/swift/ClientInterface+Private.swift
+++ b/test-suite/generated-src/swift/ClientInterface+Private.swift
@@ -34,12 +34,12 @@ let clientInterfaceMethods: Vtbl = [
},
]
-enum ClientInterfaceMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ClientInterface
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ClientInterfaceMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ClientInterface
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { fatalError("n/a") })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { djinni_generated.ClientInterfaceSwiftProxy.make(ctxPtr(s, clientInterfaceMethods), dispatcherProtocalCall)})
}
}
diff --git a/test-suite/generated-src/swift/ClientReturnedRecord+Private.swift b/test-suite/generated-src/swift/ClientReturnedRecord+Private.swift
index 11496b4f..9510131e 100644
--- a/test-suite/generated-src/swift/ClientReturnedRecord+Private.swift
+++ b/test-suite/generated-src/swift/ClientReturnedRecord+Private.swift
@@ -7,9 +7,9 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum ClientReturnedRecordMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ClientReturnedRecord
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ClientReturnedRecordMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ClientReturnedRecord
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let recordId = I64Marshaller.fromCpp(djinni.swift.getMember(p, 0))
let content = StringMarshaller.fromCpp(djinni.swift.getMember(p, 1))
@@ -17,7 +17,7 @@ enum ClientReturnedRecordMarshaller: DjinniSupport.Marshaller {
return SwiftType(recordId: recordId, content: content, misc: misc)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, I64Marshaller.toCpp(s.recordId))
djinni.swift.addMember(&ret, StringMarshaller.toCpp(s.content))
diff --git a/test-suite/generated-src/swift/Color+Private.swift b/test-suite/generated-src/swift/Color+Private.swift
index 9a233fc1..8c4d2207 100644
--- a/test-suite/generated-src/swift/Color+Private.swift
+++ b/test-suite/generated-src/swift/Color+Private.swift
@@ -4,4 +4,4 @@
import DjinniSupport
import TestSuite
-typealias ColorMarshaller = DjinniSupport.EnumMarshaller
+public typealias ColorMarshaller = DjinniSupport.EnumMarshaller
diff --git a/test-suite/generated-src/swift/Conflict+Private.swift b/test-suite/generated-src/swift/Conflict+Private.swift
index f7443b2c..e889c093 100644
--- a/test-suite/generated-src/swift/Conflict+Private.swift
+++ b/test-suite/generated-src/swift/Conflict+Private.swift
@@ -14,12 +14,12 @@ import TestSuiteCxx
final class ConflictCppProxy: DjinniSupport.CppProxy, TestSuite.Conflict {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
}
-enum ConflictMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.Conflict
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ConflictMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.Conflict
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { ConflictCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
diff --git a/test-suite/generated-src/swift/ConflictUser+Private.swift b/test-suite/generated-src/swift/ConflictUser+Private.swift
index 506285d8..0062fe83 100644
--- a/test-suite/generated-src/swift/ConflictUser+Private.swift
+++ b/test-suite/generated-src/swift/ConflictUser+Private.swift
@@ -10,27 +10,27 @@ import TestSuiteCxx
final class ConflictUserCppProxy: DjinniSupport.CppProxy, TestSuite.ConflictUser {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
func Conflict() throws -> TestSuite.Conflict {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- var ret = djinni_generated.ConflictUser_Conflict(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ var ret = djinni_generated.ConflictUser_Conflict(&_params)
try handleCppErrors(&ret)
return ConflictMarshaller.fromCpp(ret)
}
func conflictArg(_ cs: Array) throws -> Bool {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(ListMarshaller.toCpp(cs))
- var ret = djinni_generated.ConflictUser_conflictArg(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(ListMarshaller.toCpp(cs))
+ var ret = djinni_generated.ConflictUser_conflictArg(&_params)
try handleCppErrors(&ret)
return BoolMarshaller.fromCpp(ret)
}
}
-enum ConflictUserMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ConflictUser
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ConflictUserMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ConflictUser
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { ConflictUserCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
diff --git a/test-suite/generated-src/swift/ConstantEnum+Private.swift b/test-suite/generated-src/swift/ConstantEnum+Private.swift
index 94de0827..3bc3f10b 100644
--- a/test-suite/generated-src/swift/ConstantEnum+Private.swift
+++ b/test-suite/generated-src/swift/ConstantEnum+Private.swift
@@ -4,4 +4,4 @@
import DjinniSupport
import TestSuite
-typealias ConstantEnumMarshaller = DjinniSupport.EnumMarshaller
+public typealias ConstantEnumMarshaller = DjinniSupport.EnumMarshaller
diff --git a/test-suite/generated-src/swift/ConstantInterfaceWithEnum+Private.swift b/test-suite/generated-src/swift/ConstantInterfaceWithEnum+Private.swift
index 5d6f14ae..4ff4d526 100644
--- a/test-suite/generated-src/swift/ConstantInterfaceWithEnum+Private.swift
+++ b/test-suite/generated-src/swift/ConstantInterfaceWithEnum+Private.swift
@@ -11,12 +11,12 @@ import TestSuiteCxx
final class ConstantInterfaceWithEnumCppProxy: DjinniSupport.CppProxy, TestSuite.ConstantInterfaceWithEnum {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
}
-enum ConstantInterfaceWithEnumMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ConstantInterfaceWithEnum
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ConstantInterfaceWithEnumMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ConstantInterfaceWithEnum
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { ConstantInterfaceWithEnumCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
diff --git a/test-suite/generated-src/swift/ConstantRecord+Private.swift b/test-suite/generated-src/swift/ConstantRecord+Private.swift
index 59c1b2d3..702ad583 100644
--- a/test-suite/generated-src/swift/ConstantRecord+Private.swift
+++ b/test-suite/generated-src/swift/ConstantRecord+Private.swift
@@ -7,16 +7,16 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum ConstantRecordMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ConstantRecord
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ConstantRecordMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ConstantRecord
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let someInteger = I32Marshaller.fromCpp(djinni.swift.getMember(p, 0))
let someString = StringMarshaller.fromCpp(djinni.swift.getMember(p, 1))
return SwiftType(someInteger: someInteger, someString: someString)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, I32Marshaller.toCpp(s.someInteger))
djinni.swift.addMember(&ret, StringMarshaller.toCpp(s.someString))
diff --git a/test-suite/generated-src/swift/ConstantWithEnum+Private.swift b/test-suite/generated-src/swift/ConstantWithEnum+Private.swift
index edff8b12..207197d9 100644
--- a/test-suite/generated-src/swift/ConstantWithEnum+Private.swift
+++ b/test-suite/generated-src/swift/ConstantWithEnum+Private.swift
@@ -7,14 +7,14 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum ConstantWithEnumMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ConstantWithEnum
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ConstantWithEnumMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ConstantWithEnum
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
return SwiftType()
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return djinni.swift.makeCompositeValue()
}
}
diff --git a/test-suite/generated-src/swift/Constants+Private.swift b/test-suite/generated-src/swift/Constants+Private.swift
index 1a25dffd..a41694ae 100644
--- a/test-suite/generated-src/swift/Constants+Private.swift
+++ b/test-suite/generated-src/swift/Constants+Private.swift
@@ -7,14 +7,14 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum ConstantsMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.Constants
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ConstantsMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.Constants
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
return SwiftType()
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return djinni.swift.makeCompositeValue()
}
}
diff --git a/test-suite/generated-src/swift/ConstantsInterface+Private.swift b/test-suite/generated-src/swift/ConstantsInterface+Private.swift
index 6d740e70..983df413 100644
--- a/test-suite/generated-src/swift/ConstantsInterface+Private.swift
+++ b/test-suite/generated-src/swift/ConstantsInterface+Private.swift
@@ -11,18 +11,18 @@ import TestSuiteCxx
final class ConstantsInterfaceCppProxy: DjinniSupport.CppProxy, TestSuite.ConstantsInterface {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
func dummy() throws -> Void {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- var ret = djinni_generated.ConstantsInterface_dummy(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ var ret = djinni_generated.ConstantsInterface_dummy(&_params)
try handleCppErrors(&ret)
}
}
-enum ConstantsInterfaceMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ConstantsInterface
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ConstantsInterfaceMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ConstantsInterface
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { ConstantsInterfaceCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
diff --git a/test-suite/generated-src/swift/CppException+Private.swift b/test-suite/generated-src/swift/CppException+Private.swift
index c4f95dce..0275ec7d 100644
--- a/test-suite/generated-src/swift/CppException+Private.swift
+++ b/test-suite/generated-src/swift/CppException+Private.swift
@@ -10,42 +10,42 @@ import TestSuiteCxx
final class CppExceptionCppProxy: DjinniSupport.CppProxy, TestSuite.CppException {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
func throwAnException() throws -> Int32 {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- var ret = djinni_generated.CppException_throwAnException(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ var ret = djinni_generated.CppException_throwAnException(&_params)
try handleCppErrors(&ret)
return I32Marshaller.fromCpp(ret)
}
func callThrowingInterface(_ cb: TestSuite.ThrowingInterface) throws -> Int32 {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(ThrowingInterfaceMarshaller.toCpp(cb))
- var ret = djinni_generated.CppException_callThrowingInterface(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(ThrowingInterfaceMarshaller.toCpp(cb))
+ var ret = djinni_generated.CppException_callThrowingInterface(&_params)
try handleCppErrors(&ret)
return I32Marshaller.fromCpp(ret)
}
func callThrowingAndCatch(_ cb: TestSuite.ThrowingInterface) throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(ThrowingInterfaceMarshaller.toCpp(cb))
- var ret = djinni_generated.CppException_callThrowingAndCatch(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(ThrowingInterfaceMarshaller.toCpp(cb))
+ var ret = djinni_generated.CppException_callThrowingAndCatch(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
}
-enum CppExceptionMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.CppException
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum CppExceptionMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.CppException
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { CppExceptionCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
public class CppException_statics {
- static func get() throws -> TestSuite.CppException {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.CppException_get(¶ms)
+ public static func get() throws -> TestSuite.CppException {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.CppException_get(&_params)
try handleCppErrors(&ret)
return CppExceptionMarshaller.fromCpp(ret)
}
diff --git a/test-suite/generated-src/swift/DataRefTest+Private.swift b/test-suite/generated-src/swift/DataRefTest+Private.swift
index dc2f42be..fb0f01f9 100644
--- a/test-suite/generated-src/swift/DataRefTest+Private.swift
+++ b/test-suite/generated-src/swift/DataRefTest+Private.swift
@@ -9,77 +9,77 @@ import TestSuiteCxx
final class DataRefTestCppProxy: DjinniSupport.CppProxy, TestSuite.DataRefTest {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
- func sendData(_ data: NSData) throws -> Void {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(DataRefMarshaller.toCpp(data))
- var ret = djinni_generated.DataRefTest_sendData(¶ms)
+ func sendData(_ data: Foundation.NSData) throws -> Void {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(DjinniSupport.DataRefMarshaller.toCpp(data))
+ var ret = djinni_generated.DataRefTest_sendData(&_params)
try handleCppErrors(&ret)
}
func retriveAsBin() throws -> Data {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- var ret = djinni_generated.DataRefTest_retriveAsBin(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ var ret = djinni_generated.DataRefTest_retriveAsBin(&_params)
try handleCppErrors(&ret)
return BinaryMarshaller.fromCpp(ret)
}
- func sendMutableData(_ data: NSData) throws -> Void {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(DataRefMarshaller.toCpp(data))
- var ret = djinni_generated.DataRefTest_sendMutableData(¶ms)
+ func sendMutableData(_ data: Foundation.NSData) throws -> Void {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(DjinniSupport.DataRefMarshaller.toCpp(data))
+ var ret = djinni_generated.DataRefTest_sendMutableData(&_params)
try handleCppErrors(&ret)
}
- func generateData() throws -> NSData {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- var ret = djinni_generated.DataRefTest_generateData(¶ms)
+ func generateData() throws -> Foundation.NSData {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ var ret = djinni_generated.DataRefTest_generateData(&_params)
try handleCppErrors(&ret)
- return DataRefMarshaller.fromCpp(ret)
+ return DjinniSupport.DataRefMarshaller.fromCpp(ret)
}
- func dataFromVec() throws -> NSData {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- var ret = djinni_generated.DataRefTest_dataFromVec(¶ms)
+ func dataFromVec() throws -> Foundation.NSData {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ var ret = djinni_generated.DataRefTest_dataFromVec(&_params)
try handleCppErrors(&ret)
- return DataRefMarshaller.fromCpp(ret)
+ return DjinniSupport.DataRefMarshaller.fromCpp(ret)
}
- func dataFromStr() throws -> NSData {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- var ret = djinni_generated.DataRefTest_dataFromStr(¶ms)
+ func dataFromStr() throws -> Foundation.NSData {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ var ret = djinni_generated.DataRefTest_dataFromStr(&_params)
try handleCppErrors(&ret)
- return DataRefMarshaller.fromCpp(ret)
+ return DjinniSupport.DataRefMarshaller.fromCpp(ret)
}
- func sendDataView(_ data: NSData) throws -> Data {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(DataViewMarshaller.toCpp(data))
- var ret = djinni_generated.DataRefTest_sendDataView(¶ms)
+ func sendDataView(_ data: Foundation.NSData) throws -> Data {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(DjinniSupport.DataViewMarshaller.toCpp(data))
+ var ret = djinni_generated.DataRefTest_sendDataView(&_params)
try handleCppErrors(&ret)
return BinaryMarshaller.fromCpp(ret)
}
- func recvDataView() throws -> NSData {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- var ret = djinni_generated.DataRefTest_recvDataView(¶ms)
+ func recvDataView() throws -> Foundation.NSData {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ var ret = djinni_generated.DataRefTest_recvDataView(&_params)
try handleCppErrors(&ret)
- return DataViewMarshaller.fromCpp(ret)
+ return DjinniSupport.DataViewMarshaller.fromCpp(ret)
}
}
-enum DataRefTestMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.DataRefTest
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum DataRefTestMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.DataRefTest
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { DataRefTestCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
public class DataRefTest_statics {
- static func create() throws -> TestSuite.DataRefTest {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.DataRefTest_create(¶ms)
+ public static func create() throws -> TestSuite.DataRefTest {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.DataRefTest_create(&_params)
try handleCppErrors(&ret)
return DataRefTestMarshaller.fromCpp(ret)
}
diff --git a/test-suite/generated-src/swift/DataRefTest.swift b/test-suite/generated-src/swift/DataRefTest.swift
index 350bd74c..7c87d637 100644
--- a/test-suite/generated-src/swift/DataRefTest.swift
+++ b/test-suite/generated-src/swift/DataRefTest.swift
@@ -4,12 +4,12 @@
import Foundation
public protocol DataRefTest: AnyObject {
- func sendData(_ data: NSData) throws -> Void
+ func sendData(_ data: Foundation.NSData) throws -> Void
func retriveAsBin() throws -> Data
- func sendMutableData(_ data: NSData) throws -> Void
- func generateData() throws -> NSData
- func dataFromVec() throws -> NSData
- func dataFromStr() throws -> NSData
- func sendDataView(_ data: NSData) throws -> Data
- func recvDataView() throws -> NSData
+ func sendMutableData(_ data: Foundation.NSData) throws -> Void
+ func generateData() throws -> Foundation.NSData
+ func dataFromVec() throws -> Foundation.NSData
+ func dataFromStr() throws -> Foundation.NSData
+ func sendDataView(_ data: Foundation.NSData) throws -> Data
+ func recvDataView() throws -> Foundation.NSData
}
diff --git a/test-suite/generated-src/swift/DateRecord+Private.swift b/test-suite/generated-src/swift/DateRecord+Private.swift
index 0e12bb74..9b437108 100644
--- a/test-suite/generated-src/swift/DateRecord+Private.swift
+++ b/test-suite/generated-src/swift/DateRecord+Private.swift
@@ -7,15 +7,15 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum DateRecordMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.DateRecord
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum DateRecordMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.DateRecord
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let createdAt = DateMarshaller.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(createdAt: createdAt)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, DateMarshaller.toCpp(s.createdAt))
return ret
diff --git a/test-suite/generated-src/swift/DateRecord.swift b/test-suite/generated-src/swift/DateRecord.swift
index 4d6d1a8e..d302a076 100644
--- a/test-suite/generated-src/swift/DateRecord.swift
+++ b/test-suite/generated-src/swift/DateRecord.swift
@@ -1,7 +1,6 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file was generated by Djinni from date.djinni
-import DjinniSupport
import Foundation
public struct DateRecord: Equatable {
diff --git a/test-suite/generated-src/swift/EmptyFlags+Private.swift b/test-suite/generated-src/swift/EmptyFlags+Private.swift
index f09a089e..c1202c70 100644
--- a/test-suite/generated-src/swift/EmptyFlags+Private.swift
+++ b/test-suite/generated-src/swift/EmptyFlags+Private.swift
@@ -4,4 +4,4 @@
import DjinniSupport
import TestSuite
-typealias EmptyFlagsMarshaller = DjinniSupport.EnumMarshaller
+public typealias EmptyFlagsMarshaller = DjinniSupport.EnumMarshaller
diff --git a/test-suite/generated-src/swift/EmptyRecord+Private.swift b/test-suite/generated-src/swift/EmptyRecord+Private.swift
index 24c4fd65..21b1297e 100644
--- a/test-suite/generated-src/swift/EmptyRecord+Private.swift
+++ b/test-suite/generated-src/swift/EmptyRecord+Private.swift
@@ -7,14 +7,14 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum EmptyRecordMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.EmptyRecord
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum EmptyRecordMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.EmptyRecord
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
return SwiftType()
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return djinni.swift.makeCompositeValue()
}
}
diff --git a/test-suite/generated-src/swift/EnumUsageInterface+Private.swift b/test-suite/generated-src/swift/EnumUsageInterface+Private.swift
index df7bf877..04e3cb5a 100644
--- a/test-suite/generated-src/swift/EnumUsageInterface+Private.swift
+++ b/test-suite/generated-src/swift/EnumUsageInterface+Private.swift
@@ -10,52 +10,52 @@ import TestSuiteCxx
final class EnumUsageInterfaceCppProxy: DjinniSupport.CppProxy, TestSuite.EnumUsageInterface {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
func e(_ e: TestSuite.Color) throws -> TestSuite.Color {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(ColorMarshaller.toCpp(e))
- var ret = djinni_generated.EnumUsageInterface_e(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(ColorMarshaller.toCpp(e))
+ var ret = djinni_generated.EnumUsageInterface_e(&_params)
try handleCppErrors(&ret)
return ColorMarshaller.fromCpp(ret)
}
func o(_ o: Optional) throws -> Optional {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(OptionalMarshaller.toCpp(o))
- var ret = djinni_generated.EnumUsageInterface_o(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(OptionalMarshaller.toCpp(o))
+ var ret = djinni_generated.EnumUsageInterface_o(&_params)
try handleCppErrors(&ret)
return OptionalMarshaller.fromCpp(ret)
}
func l(_ l: Array) throws -> Array {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(ListMarshaller.toCpp(l))
- var ret = djinni_generated.EnumUsageInterface_l(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(ListMarshaller.toCpp(l))
+ var ret = djinni_generated.EnumUsageInterface_l(&_params)
try handleCppErrors(&ret)
return ListMarshaller.fromCpp(ret)
}
func s(_ s: Set) throws -> Set {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(SetMarshaller.toCpp(s))
- var ret = djinni_generated.EnumUsageInterface_s(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(SetMarshaller.toCpp(s))
+ var ret = djinni_generated.EnumUsageInterface_s(&_params)
try handleCppErrors(&ret)
return SetMarshaller.fromCpp(ret)
}
func m(_ m: Dictionary) throws -> Dictionary {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(MapMarshaller.toCpp(m))
- var ret = djinni_generated.EnumUsageInterface_m(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(MapMarshaller.toCpp(m))
+ var ret = djinni_generated.EnumUsageInterface_m(&_params)
try handleCppErrors(&ret)
return MapMarshaller.fromCpp(ret)
}
}
-enum EnumUsageInterfaceMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.EnumUsageInterface
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum EnumUsageInterfaceMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.EnumUsageInterface
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { EnumUsageInterfaceCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
diff --git a/test-suite/generated-src/swift/EnumUsageRecord+Private.swift b/test-suite/generated-src/swift/EnumUsageRecord+Private.swift
index fd7f34bd..61049fde 100644
--- a/test-suite/generated-src/swift/EnumUsageRecord+Private.swift
+++ b/test-suite/generated-src/swift/EnumUsageRecord+Private.swift
@@ -7,9 +7,9 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum EnumUsageRecordMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.EnumUsageRecord
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum EnumUsageRecordMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.EnumUsageRecord
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let e = ColorMarshaller.fromCpp(djinni.swift.getMember(p, 0))
let o = OptionalMarshaller.fromCpp(djinni.swift.getMember(p, 1))
@@ -19,7 +19,7 @@ enum EnumUsageRecordMarshaller: DjinniSupport.Marshaller {
return SwiftType(e: e, o: o, l: l, s: s, m: m)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, ColorMarshaller.toCpp(s.e))
djinni.swift.addMember(&ret, OptionalMarshaller.toCpp(s.o))
diff --git a/test-suite/generated-src/swift/ExtendedRecord+Private.swift b/test-suite/generated-src/swift/ExtendedRecord+Private.swift
index 6b68248f..e714141d 100644
--- a/test-suite/generated-src/swift/ExtendedRecord+Private.swift
+++ b/test-suite/generated-src/swift/ExtendedRecord+Private.swift
@@ -7,15 +7,15 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum ExtendedRecordMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ExtendedRecord
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ExtendedRecordMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ExtendedRecord
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let foo = BoolMarshaller.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(foo: foo)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, BoolMarshaller.toCpp(s.foo))
return ret
diff --git a/test-suite/generated-src/swift/ExternInterface1+Private.swift b/test-suite/generated-src/swift/ExternInterface1+Private.swift
index 25e743c7..df7401c6 100644
--- a/test-suite/generated-src/swift/ExternInterface1+Private.swift
+++ b/test-suite/generated-src/swift/ExternInterface1+Private.swift
@@ -9,29 +9,29 @@ import TestSuiteCxx
final class ExternInterface1CppProxy: DjinniSupport.CppProxy, TestSuite.ExternInterface1 {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
- func foo(_ i: ClientInterface) throws -> ClientReturnedRecord {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(ClientInterfaceMarshaller.toCpp(i))
- var ret = djinni_generated.ExternInterface1_foo(¶ms)
+ func foo(_ i: TestSuite.ClientInterface) throws -> TestSuite.ClientReturnedRecord {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(TestSuite.ClientInterfaceMarshaller.toCpp(i))
+ var ret = djinni_generated.ExternInterface1_foo(&_params)
try handleCppErrors(&ret)
- return ClientReturnedRecordMarshaller.fromCpp(ret)
+ return TestSuite.ClientReturnedRecordMarshaller.fromCpp(ret)
}
- func bar(_ e: Color) throws -> Color {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(ColorMarshaller.toCpp(e))
- var ret = djinni_generated.ExternInterface1_bar(¶ms)
+ func bar(_ e: TestSuite.Color) throws -> TestSuite.Color {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(TestSuite.ColorMarshaller.toCpp(e))
+ var ret = djinni_generated.ExternInterface1_bar(&_params)
try handleCppErrors(&ret)
- return ColorMarshaller.fromCpp(ret)
+ return TestSuite.ColorMarshaller.fromCpp(ret)
}
}
-enum ExternInterface1Marshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ExternInterface1
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ExternInterface1Marshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ExternInterface1
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { ExternInterface1CppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
diff --git a/test-suite/generated-src/swift/ExternInterface1.swift b/test-suite/generated-src/swift/ExternInterface1.swift
index 16f2a983..aa4bed10 100644
--- a/test-suite/generated-src/swift/ExternInterface1.swift
+++ b/test-suite/generated-src/swift/ExternInterface1.swift
@@ -4,6 +4,6 @@
import Foundation
public protocol ExternInterface1: AnyObject {
- func foo(_ i: ClientInterface) throws -> ClientReturnedRecord
- func bar(_ e: Color) throws -> Color
+ func foo(_ i: TestSuite.ClientInterface) throws -> TestSuite.ClientReturnedRecord
+ func bar(_ e: TestSuite.Color) throws -> TestSuite.Color
}
diff --git a/test-suite/generated-src/swift/ExternInterface2+Private.swift b/test-suite/generated-src/swift/ExternInterface2+Private.swift
index 073b61d7..41a35029 100644
--- a/test-suite/generated-src/swift/ExternInterface2+Private.swift
+++ b/test-suite/generated-src/swift/ExternInterface2+Private.swift
@@ -7,12 +7,12 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum ExternInterface2Marshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ExternInterface2
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ExternInterface2Marshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ExternInterface2
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { fatalError("n/a") })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
diff --git a/test-suite/generated-src/swift/ExternInterface2.swift b/test-suite/generated-src/swift/ExternInterface2.swift
index 16aa9b5d..54098b6a 100644
--- a/test-suite/generated-src/swift/ExternInterface2.swift
+++ b/test-suite/generated-src/swift/ExternInterface2.swift
@@ -4,5 +4,5 @@
import Foundation
public protocol ExternInterface2: AnyObject {
- func foo(_ i: TestHelpers) throws -> TestSuite.ExternRecordWithDerivings
+ func foo(_ i: TestSuite.TestHelpers) throws -> TestSuite.ExternRecordWithDerivings
}
diff --git a/test-suite/generated-src/swift/ExternRecordWithDerivings+Private.swift b/test-suite/generated-src/swift/ExternRecordWithDerivings+Private.swift
index 9a00f402..c31201a5 100644
--- a/test-suite/generated-src/swift/ExternRecordWithDerivings+Private.swift
+++ b/test-suite/generated-src/swift/ExternRecordWithDerivings+Private.swift
@@ -7,19 +7,19 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum ExternRecordWithDerivingsMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ExternRecordWithDerivings
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ExternRecordWithDerivingsMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ExternRecordWithDerivings
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
- let member = RecordWithDerivingsMarshaller.fromCpp(djinni.swift.getMember(p, 0))
- let e = ColorMarshaller.fromCpp(djinni.swift.getMember(p, 1))
+ let member = TestSuite.RecordWithDerivingsMarshaller.fromCpp(djinni.swift.getMember(p, 0))
+ let e = TestSuite.ColorMarshaller.fromCpp(djinni.swift.getMember(p, 1))
return SwiftType(member: member, e: e)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
- djinni.swift.addMember(&ret, RecordWithDerivingsMarshaller.toCpp(s.member))
- djinni.swift.addMember(&ret, ColorMarshaller.toCpp(s.e))
+ djinni.swift.addMember(&ret, TestSuite.RecordWithDerivingsMarshaller.toCpp(s.member))
+ djinni.swift.addMember(&ret, TestSuite.ColorMarshaller.toCpp(s.e))
return ret
}
}
diff --git a/test-suite/generated-src/swift/ExternRecordWithDerivings.swift b/test-suite/generated-src/swift/ExternRecordWithDerivings.swift
index 5c77ff81..07231672 100644
--- a/test-suite/generated-src/swift/ExternRecordWithDerivings.swift
+++ b/test-suite/generated-src/swift/ExternRecordWithDerivings.swift
@@ -5,10 +5,10 @@ import Foundation
/** This file tests YAML dumped by Djinni can be parsed back in */
public struct ExternRecordWithDerivings: Equatable {
- public var member: RecordWithDerivings
- public var e: Color
+ public var member: TestSuite.RecordWithDerivings
+ public var e: TestSuite.Color
- public init(member: RecordWithDerivings, e: Color)
+ public init(member: TestSuite.RecordWithDerivings, e: TestSuite.Color)
{
self.member = member
self.e = e
diff --git a/test-suite/generated-src/swift/FirstListener+Private.swift b/test-suite/generated-src/swift/FirstListener+Private.swift
index 958fb54a..5148020b 100644
--- a/test-suite/generated-src/swift/FirstListener+Private.swift
+++ b/test-suite/generated-src/swift/FirstListener+Private.swift
@@ -8,12 +8,12 @@ import TestSuite
import TestSuiteCxx
/** Used for ObjC multiple inheritance tests */
-enum FirstListenerMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.FirstListener
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum FirstListenerMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.FirstListener
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { fatalError("n/a") })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
diff --git a/test-suite/generated-src/swift/FlagRoundtrip+Private.swift b/test-suite/generated-src/swift/FlagRoundtrip+Private.swift
index a74c69a7..c0d2c9d9 100644
--- a/test-suite/generated-src/swift/FlagRoundtrip+Private.swift
+++ b/test-suite/generated-src/swift/FlagRoundtrip+Private.swift
@@ -10,41 +10,41 @@ import TestSuiteCxx
final class FlagRoundtripCppProxy: DjinniSupport.CppProxy, TestSuite.FlagRoundtrip {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
}
-enum FlagRoundtripMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.FlagRoundtrip
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum FlagRoundtripMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.FlagRoundtrip
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { FlagRoundtripCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
public class FlagRoundtrip_statics {
- static func roundtripAccess(_ flag: TestSuite.AccessFlags) throws -> TestSuite.AccessFlags {
- var params = djinni.swift.ParameterList()
- params.addValue(AccessFlagsMarshaller.toCpp(flag))
- var ret = djinni_generated.FlagRoundtrip_roundtripAccess(¶ms)
+ public static func roundtripAccess(_ flag: TestSuite.AccessFlags) throws -> TestSuite.AccessFlags {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(AccessFlagsMarshaller.toCpp(flag))
+ var ret = djinni_generated.FlagRoundtrip_roundtripAccess(&_params)
try handleCppErrors(&ret)
return AccessFlagsMarshaller.fromCpp(ret)
}
- static func roundtripEmpty(_ flag: TestSuite.EmptyFlags) throws -> TestSuite.EmptyFlags {
- var params = djinni.swift.ParameterList()
- params.addValue(EmptyFlagsMarshaller.toCpp(flag))
- var ret = djinni_generated.FlagRoundtrip_roundtripEmpty(¶ms)
+ public static func roundtripEmpty(_ flag: TestSuite.EmptyFlags) throws -> TestSuite.EmptyFlags {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(EmptyFlagsMarshaller.toCpp(flag))
+ var ret = djinni_generated.FlagRoundtrip_roundtripEmpty(&_params)
try handleCppErrors(&ret)
return EmptyFlagsMarshaller.fromCpp(ret)
}
- static func roundtripAccessBoxed(_ flag: Optional) throws -> Optional {
- var params = djinni.swift.ParameterList()
- params.addValue(OptionalMarshaller.toCpp(flag))
- var ret = djinni_generated.FlagRoundtrip_roundtripAccessBoxed(¶ms)
+ public static func roundtripAccessBoxed(_ flag: Optional) throws -> Optional {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(OptionalMarshaller.toCpp(flag))
+ var ret = djinni_generated.FlagRoundtrip_roundtripAccessBoxed(&_params)
try handleCppErrors(&ret)
return OptionalMarshaller.fromCpp(ret)
}
- static func roundtripEmptyBoxed(_ flag: Optional) throws -> Optional {
- var params = djinni.swift.ParameterList()
- params.addValue(OptionalMarshaller.toCpp(flag))
- var ret = djinni_generated.FlagRoundtrip_roundtripEmptyBoxed(¶ms)
+ public static func roundtripEmptyBoxed(_ flag: Optional) throws -> Optional {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(OptionalMarshaller.toCpp(flag))
+ var ret = djinni_generated.FlagRoundtrip_roundtripEmptyBoxed(&_params)
try handleCppErrors(&ret)
return OptionalMarshaller.fromCpp(ret)
}
diff --git a/test-suite/generated-src/swift/InterfaceUsingExtendedRecord+Private.swift b/test-suite/generated-src/swift/InterfaceUsingExtendedRecord+Private.swift
index 5b7a99fd..7f402fce 100644
--- a/test-suite/generated-src/swift/InterfaceUsingExtendedRecord+Private.swift
+++ b/test-suite/generated-src/swift/InterfaceUsingExtendedRecord+Private.swift
@@ -10,20 +10,20 @@ import TestSuiteCxx
final class InterfaceUsingExtendedRecordCppProxy: DjinniSupport.CppProxy, TestSuite.InterfaceUsingExtendedRecord {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
func meth(_ er: TestSuite.ExtendedRecord) throws -> TestSuite.ExtendedRecord {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(ExtendedRecordMarshaller.toCpp(er))
- var ret = djinni_generated.InterfaceUsingExtendedRecord_meth(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(ExtendedRecordMarshaller.toCpp(er))
+ var ret = djinni_generated.InterfaceUsingExtendedRecord_meth(&_params)
try handleCppErrors(&ret)
return ExtendedRecordMarshaller.fromCpp(ret)
}
}
-enum InterfaceUsingExtendedRecordMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.InterfaceUsingExtendedRecord
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum InterfaceUsingExtendedRecordMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.InterfaceUsingExtendedRecord
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { InterfaceUsingExtendedRecordCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
diff --git a/test-suite/generated-src/swift/JavaOnlyListener+Private.swift b/test-suite/generated-src/swift/JavaOnlyListener+Private.swift
index 36734f2c..c0e8357a 100644
--- a/test-suite/generated-src/swift/JavaOnlyListener+Private.swift
+++ b/test-suite/generated-src/swift/JavaOnlyListener+Private.swift
@@ -7,12 +7,12 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum JavaOnlyListenerMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.JavaOnlyListener
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum JavaOnlyListenerMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.JavaOnlyListener
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { fatalError("n/a") })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
diff --git a/test-suite/generated-src/swift/ListenerCaller+Private.swift b/test-suite/generated-src/swift/ListenerCaller+Private.swift
index b21aa98f..d07ce76d 100644
--- a/test-suite/generated-src/swift/ListenerCaller+Private.swift
+++ b/test-suite/generated-src/swift/ListenerCaller+Private.swift
@@ -16,33 +16,33 @@ import TestSuiteCxx
final class ListenerCallerCppProxy: DjinniSupport.CppProxy, TestSuite.ListenerCaller {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
func callFirst() throws -> Void {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- var ret = djinni_generated.ListenerCaller_callFirst(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ var ret = djinni_generated.ListenerCaller_callFirst(&_params)
try handleCppErrors(&ret)
}
func callSecond() throws -> Void {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- var ret = djinni_generated.ListenerCaller_callSecond(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ var ret = djinni_generated.ListenerCaller_callSecond(&_params)
try handleCppErrors(&ret)
}
}
-enum ListenerCallerMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ListenerCaller
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ListenerCallerMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ListenerCaller
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { ListenerCallerCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
public class ListenerCaller_statics {
- static func _init(_ firstL: TestSuite.FirstListener, secondL: TestSuite.SecondListener) throws -> TestSuite.ListenerCaller {
- var params = djinni.swift.ParameterList()
- params.addValue(FirstListenerMarshaller.toCpp(firstL))
- params.addValue(SecondListenerMarshaller.toCpp(secondL))
- var ret = djinni_generated.ListenerCaller_init(¶ms)
+ public static func _init(_ firstL: TestSuite.FirstListener, secondL: TestSuite.SecondListener) throws -> TestSuite.ListenerCaller {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(FirstListenerMarshaller.toCpp(firstL))
+ _params.addValue(SecondListenerMarshaller.toCpp(secondL))
+ var ret = djinni_generated.ListenerCaller_init(&_params)
try handleCppErrors(&ret)
return ListenerCallerMarshaller.fromCpp(ret)
}
diff --git a/test-suite/generated-src/swift/MapDateRecord+Private.swift b/test-suite/generated-src/swift/MapDateRecord+Private.swift
index 2e26e5fd..3c0b083f 100644
--- a/test-suite/generated-src/swift/MapDateRecord+Private.swift
+++ b/test-suite/generated-src/swift/MapDateRecord+Private.swift
@@ -7,15 +7,15 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum MapDateRecordMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.MapDateRecord
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum MapDateRecordMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.MapDateRecord
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let datesById = MapMarshaller.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(datesById: datesById)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, MapMarshaller.toCpp(s.datesById))
return ret
diff --git a/test-suite/generated-src/swift/MapDateRecord.swift b/test-suite/generated-src/swift/MapDateRecord.swift
index d92c7e07..043dda69 100644
--- a/test-suite/generated-src/swift/MapDateRecord.swift
+++ b/test-suite/generated-src/swift/MapDateRecord.swift
@@ -1,7 +1,6 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file was generated by Djinni from date.djinni
-import DjinniSupport
import Foundation
public struct MapDateRecord {
diff --git a/test-suite/generated-src/swift/MapListRecord+Private.swift b/test-suite/generated-src/swift/MapListRecord+Private.swift
index 76d2dfc9..a025632e 100644
--- a/test-suite/generated-src/swift/MapListRecord+Private.swift
+++ b/test-suite/generated-src/swift/MapListRecord+Private.swift
@@ -7,15 +7,15 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum MapListRecordMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.MapListRecord
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum MapListRecordMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.MapListRecord
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let mapList = ListMarshaller>.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(mapList: mapList)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, ListMarshaller>.toCpp(s.mapList))
return ret
diff --git a/test-suite/generated-src/swift/MapRecord+Private.swift b/test-suite/generated-src/swift/MapRecord+Private.swift
index 2ec9220e..06c4e566 100644
--- a/test-suite/generated-src/swift/MapRecord+Private.swift
+++ b/test-suite/generated-src/swift/MapRecord+Private.swift
@@ -7,16 +7,16 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum MapRecordMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.MapRecord
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum MapRecordMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.MapRecord
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let map = MapMarshaller.fromCpp(djinni.swift.getMember(p, 0))
let imap = MapMarshaller.fromCpp(djinni.swift.getMember(p, 1))
return SwiftType(map: map, imap: imap)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, MapMarshaller.toCpp(s.map))
djinni.swift.addMember(&ret, MapMarshaller.toCpp(s.imap))
diff --git a/test-suite/generated-src/swift/NestedCollection+Private.swift b/test-suite/generated-src/swift/NestedCollection+Private.swift
index f8ad387a..6d65cb51 100644
--- a/test-suite/generated-src/swift/NestedCollection+Private.swift
+++ b/test-suite/generated-src/swift/NestedCollection+Private.swift
@@ -7,15 +7,15 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum NestedCollectionMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.NestedCollection
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum NestedCollectionMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.NestedCollection
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let setList = ListMarshaller>.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(setList: setList)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, ListMarshaller>.toCpp(s.setList))
return ret
diff --git a/test-suite/generated-src/swift/NestedOutcome+Private.swift b/test-suite/generated-src/swift/NestedOutcome+Private.swift
index 13ce4e5d..c946149d 100644
--- a/test-suite/generated-src/swift/NestedOutcome+Private.swift
+++ b/test-suite/generated-src/swift/NestedOutcome+Private.swift
@@ -7,17 +7,17 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum NestedOutcomeMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.NestedOutcome
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum NestedOutcomeMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.NestedOutcome
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
- let o = OutcomeMarshaller.fromCpp(djinni.swift.getMember(p, 0))
+ let o = DjinniSupport.OutcomeMarshaller.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(o: o)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
- djinni.swift.addMember(&ret, OutcomeMarshaller.toCpp(s.o))
+ djinni.swift.addMember(&ret, DjinniSupport.OutcomeMarshaller.toCpp(s.o))
return ret
}
}
diff --git a/test-suite/generated-src/swift/ObjcOnlyListener+Private.swift b/test-suite/generated-src/swift/ObjcOnlyListener+Private.swift
index e6de364d..431dc77c 100644
--- a/test-suite/generated-src/swift/ObjcOnlyListener+Private.swift
+++ b/test-suite/generated-src/swift/ObjcOnlyListener+Private.swift
@@ -7,12 +7,12 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum ObjcOnlyListenerMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ObjcOnlyListener
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ObjcOnlyListenerMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ObjcOnlyListener
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { fatalError("n/a") })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
diff --git a/test-suite/generated-src/swift/PrimitiveList+Private.swift b/test-suite/generated-src/swift/PrimitiveList+Private.swift
index ac7ae449..7dfd79f6 100644
--- a/test-suite/generated-src/swift/PrimitiveList+Private.swift
+++ b/test-suite/generated-src/swift/PrimitiveList+Private.swift
@@ -7,15 +7,15 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum PrimitiveListMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.PrimitiveList
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum PrimitiveListMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.PrimitiveList
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let list = ListMarshaller.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(list: list)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, ListMarshaller.toCpp(s.list))
return ret
diff --git a/test-suite/generated-src/swift/ProtoTests+Private.swift b/test-suite/generated-src/swift/ProtoTests+Private.swift
index c31529b0..2c40543a 100644
--- a/test-suite/generated-src/swift/ProtoTests+Private.swift
+++ b/test-suite/generated-src/swift/ProtoTests+Private.swift
@@ -11,105 +11,105 @@ import TestSuiteCxx
final class ProtoTestsCppProxy: DjinniSupport.CppProxy, TestSuite.ProtoTests {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
}
-enum ProtoTestsMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ProtoTests
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ProtoTestsMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ProtoTests
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { ProtoTestsCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
public class ProtoTests_statics {
- static func protoToStrings(_ x: Djinni_Test_AddressBook) throws -> Array {
- var params = djinni.swift.ParameterList()
- params.addValue(ProtobufMarshaller.toCpp(x))
- var ret = djinni_generated.ProtoTests_protoToStrings(¶ms)
+ public static func protoToStrings(_ x: Djinni_Test_AddressBook) throws -> Array {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ProtobufMarshaller.toCpp(x))
+ var ret = djinni_generated.ProtoTests_protoToStrings(&_params)
try handleCppErrors(&ret)
return ListMarshaller.fromCpp(ret)
}
- static func stringsToProto(_ x: Array) throws -> Djinni_Test_AddressBook {
- var params = djinni.swift.ParameterList()
- params.addValue(ListMarshaller.toCpp(x))
- var ret = djinni_generated.ProtoTests_stringsToProto(¶ms)
+ public static func stringsToProto(_ x: Array) throws -> Djinni_Test_AddressBook {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ListMarshaller.toCpp(x))
+ var ret = djinni_generated.ProtoTests_stringsToProto(&_params)
try handleCppErrors(&ret)
return ProtobufMarshaller.fromCpp(ret)
}
- static func embeddedProtoToString(_ x: TestSuite.RecordWithEmbeddedProto) throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(RecordWithEmbeddedProtoMarshaller.toCpp(x))
- var ret = djinni_generated.ProtoTests_embeddedProtoToString(¶ms)
+ public static func embeddedProtoToString(_ x: TestSuite.RecordWithEmbeddedProto) throws -> String {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(RecordWithEmbeddedProtoMarshaller.toCpp(x))
+ var ret = djinni_generated.ProtoTests_embeddedProtoToString(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
- static func stringToEmbeddedProto(_ x: String) throws -> TestSuite.RecordWithEmbeddedProto {
- var params = djinni.swift.ParameterList()
- params.addValue(StringMarshaller.toCpp(x))
- var ret = djinni_generated.ProtoTests_stringToEmbeddedProto(¶ms)
+ public static func stringToEmbeddedProto(_ x: String) throws -> TestSuite.RecordWithEmbeddedProto {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(StringMarshaller.toCpp(x))
+ var ret = djinni_generated.ProtoTests_stringToEmbeddedProto(&_params)
try handleCppErrors(&ret)
return RecordWithEmbeddedProtoMarshaller.fromCpp(ret)
}
- static func cppProtoToString(_ x: Djinni_Test2_PersistingState) throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(ProtobufMarshaller.toCpp(x))
- var ret = djinni_generated.ProtoTests_cppProtoToString(¶ms)
+ public static func cppProtoToString(_ x: Djinni_Test2_PersistingState) throws -> String {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ProtobufMarshaller.toCpp(x))
+ var ret = djinni_generated.ProtoTests_cppProtoToString(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
- static func stringToCppProto(_ x: String) throws -> Djinni_Test2_PersistingState {
- var params = djinni.swift.ParameterList()
- params.addValue(StringMarshaller.toCpp(x))
- var ret = djinni_generated.ProtoTests_stringToCppProto(¶ms)
+ public static func stringToCppProto(_ x: String) throws -> Djinni_Test2_PersistingState {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(StringMarshaller.toCpp(x))
+ var ret = djinni_generated.ProtoTests_stringToCppProto(&_params)
try handleCppErrors(&ret)
return ProtobufMarshaller.fromCpp(ret)
}
- static func embeddedCppProtoToString(_ x: TestSuite.RecordWithEmbeddedCppProto) throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(RecordWithEmbeddedCppProtoMarshaller.toCpp(x))
- var ret = djinni_generated.ProtoTests_embeddedCppProtoToString(¶ms)
+ public static func embeddedCppProtoToString(_ x: TestSuite.RecordWithEmbeddedCppProto) throws -> String {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(RecordWithEmbeddedCppProtoMarshaller.toCpp(x))
+ var ret = djinni_generated.ProtoTests_embeddedCppProtoToString(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
- static func stringToEmbeddedCppProto(_ x: String) throws -> TestSuite.RecordWithEmbeddedCppProto {
- var params = djinni.swift.ParameterList()
- params.addValue(StringMarshaller.toCpp(x))
- var ret = djinni_generated.ProtoTests_stringToEmbeddedCppProto(¶ms)
+ public static func stringToEmbeddedCppProto(_ x: String) throws -> TestSuite.RecordWithEmbeddedCppProto {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(StringMarshaller.toCpp(x))
+ var ret = djinni_generated.ProtoTests_stringToEmbeddedCppProto(&_params)
try handleCppErrors(&ret)
return RecordWithEmbeddedCppProtoMarshaller.fromCpp(ret)
}
- static func protoListToStrings(_ x: Array) throws -> Array {
- var params = djinni.swift.ParameterList()
- params.addValue(ListMarshaller>.toCpp(x))
- var ret = djinni_generated.ProtoTests_protoListToStrings(¶ms)
+ public static func protoListToStrings(_ x: Array) throws -> Array {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ListMarshaller>.toCpp(x))
+ var ret = djinni_generated.ProtoTests_protoListToStrings(&_params)
try handleCppErrors(&ret)
return ListMarshaller.fromCpp(ret)
}
- static func stringsToProtoList(_ x: Array) throws -> Array {
- var params = djinni.swift.ParameterList()
- params.addValue(ListMarshaller.toCpp(x))
- var ret = djinni_generated.ProtoTests_stringsToProtoList(¶ms)
+ public static func stringsToProtoList(_ x: Array) throws -> Array {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ListMarshaller.toCpp(x))
+ var ret = djinni_generated.ProtoTests_stringsToProtoList(&_params)
try handleCppErrors(&ret)
return ListMarshaller>.fromCpp(ret)
}
- static func optionalProtoToString(_ x: Optional) throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(OptionalMarshaller>.toCpp(x))
- var ret = djinni_generated.ProtoTests_optionalProtoToString(¶ms)
+ public static func optionalProtoToString(_ x: Optional) throws -> String {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(OptionalMarshaller>.toCpp(x))
+ var ret = djinni_generated.ProtoTests_optionalProtoToString(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
- static func stringToOptionalProto(_ x: String) throws -> Optional {
- var params = djinni.swift.ParameterList()
- params.addValue(StringMarshaller.toCpp(x))
- var ret = djinni_generated.ProtoTests_stringToOptionalProto(¶ms)
+ public static func stringToOptionalProto(_ x: String) throws -> Optional {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(StringMarshaller.toCpp(x))
+ var ret = djinni_generated.ProtoTests_stringToOptionalProto(&_params)
try handleCppErrors(&ret)
return OptionalMarshaller>.fromCpp(ret)
}
- static func stringToProtoOutcome(_ x: String) throws -> Result {
- var params = djinni.swift.ParameterList()
- params.addValue(StringMarshaller.toCpp(x))
- var ret = djinni_generated.ProtoTests_stringToProtoOutcome(¶ms)
+ public static func stringToProtoOutcome(_ x: String) throws -> Result {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(StringMarshaller.toCpp(x))
+ var ret = djinni_generated.ProtoTests_stringToProtoOutcome(&_params)
try handleCppErrors(&ret)
- return OutcomeMarshaller, I32Marshaller>.fromCpp(ret)
+ return DjinniSupport.OutcomeMarshaller, I32Marshaller>.fromCpp(ret)
}
}
diff --git a/test-suite/generated-src/swift/RecordUsingExtendedRecord+Private.swift b/test-suite/generated-src/swift/RecordUsingExtendedRecord+Private.swift
index a8fdedfd..2ca84baa 100644
--- a/test-suite/generated-src/swift/RecordUsingExtendedRecord+Private.swift
+++ b/test-suite/generated-src/swift/RecordUsingExtendedRecord+Private.swift
@@ -7,15 +7,15 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum RecordUsingExtendedRecordMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.RecordUsingExtendedRecord
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum RecordUsingExtendedRecordMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.RecordUsingExtendedRecord
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let er = ExtendedRecordMarshaller.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(er: er)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, ExtendedRecordMarshaller.toCpp(s.er))
return ret
diff --git a/test-suite/generated-src/swift/RecordWithDerivings+Private.swift b/test-suite/generated-src/swift/RecordWithDerivings+Private.swift
index d9fbbd89..5d77e861 100644
--- a/test-suite/generated-src/swift/RecordWithDerivings+Private.swift
+++ b/test-suite/generated-src/swift/RecordWithDerivings+Private.swift
@@ -7,9 +7,9 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum RecordWithDerivingsMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.RecordWithDerivings
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum RecordWithDerivingsMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.RecordWithDerivings
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let eight = I8Marshaller.fromCpp(djinni.swift.getMember(p, 0))
let sixteen = I16Marshaller.fromCpp(djinni.swift.getMember(p, 1))
@@ -22,7 +22,7 @@ enum RecordWithDerivingsMarshaller: DjinniSupport.Marshaller {
return SwiftType(eight: eight, sixteen: sixteen, thirtytwo: thirtytwo, sixtyfour: sixtyfour, fthirtytwo: fthirtytwo, fsixtyfour: fsixtyfour, d: d, s: s)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, I8Marshaller.toCpp(s.eight))
djinni.swift.addMember(&ret, I16Marshaller.toCpp(s.sixteen))
diff --git a/test-suite/generated-src/swift/RecordWithDurationAndDerivings+Private.swift b/test-suite/generated-src/swift/RecordWithDurationAndDerivings+Private.swift
index 149a8ae2..8b328d9f 100644
--- a/test-suite/generated-src/swift/RecordWithDurationAndDerivings+Private.swift
+++ b/test-suite/generated-src/swift/RecordWithDurationAndDerivings+Private.swift
@@ -7,17 +7,17 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum RecordWithDurationAndDerivingsMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.RecordWithDurationAndDerivings
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum RecordWithDurationAndDerivingsMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.RecordWithDurationAndDerivings
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
- let dt = DurationMarshaller.fromCpp(djinni.swift.getMember(p, 0))
+ let dt = TestSuite.DurationMarshaller.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(dt: dt)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
- djinni.swift.addMember(&ret, DurationMarshaller.toCpp(s.dt))
+ djinni.swift.addMember(&ret, TestSuite.DurationMarshaller.toCpp(s.dt))
return ret
}
}
diff --git a/test-suite/generated-src/swift/RecordWithEmbeddedCppProto+Private.swift b/test-suite/generated-src/swift/RecordWithEmbeddedCppProto+Private.swift
index b4ebe851..c39aa40d 100644
--- a/test-suite/generated-src/swift/RecordWithEmbeddedCppProto+Private.swift
+++ b/test-suite/generated-src/swift/RecordWithEmbeddedCppProto+Private.swift
@@ -8,15 +8,15 @@ import ProtobufTest
import TestSuite
import TestSuiteCxx
-enum RecordWithEmbeddedCppProtoMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.RecordWithEmbeddedCppProto
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum RecordWithEmbeddedCppProtoMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.RecordWithEmbeddedCppProto
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let state = ProtobufMarshaller.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(state: state)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, ProtobufMarshaller.toCpp(s.state))
return ret
diff --git a/test-suite/generated-src/swift/RecordWithEmbeddedProto+Private.swift b/test-suite/generated-src/swift/RecordWithEmbeddedProto+Private.swift
index 0409625d..56bddf95 100644
--- a/test-suite/generated-src/swift/RecordWithEmbeddedProto+Private.swift
+++ b/test-suite/generated-src/swift/RecordWithEmbeddedProto+Private.swift
@@ -8,15 +8,15 @@ import ProtobufTest
import TestSuite
import TestSuiteCxx
-enum RecordWithEmbeddedProtoMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.RecordWithEmbeddedProto
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum RecordWithEmbeddedProtoMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.RecordWithEmbeddedProto
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let person = ProtobufMarshaller.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(person: person)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, ProtobufMarshaller.toCpp(s.person))
return ret
diff --git a/test-suite/generated-src/swift/RecordWithFlags+Private.swift b/test-suite/generated-src/swift/RecordWithFlags+Private.swift
index 7f507716..f27754e7 100644
--- a/test-suite/generated-src/swift/RecordWithFlags+Private.swift
+++ b/test-suite/generated-src/swift/RecordWithFlags+Private.swift
@@ -7,15 +7,15 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum RecordWithFlagsMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.RecordWithFlags
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum RecordWithFlagsMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.RecordWithFlags
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let access = AccessFlagsMarshaller.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(access: access)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, AccessFlagsMarshaller.toCpp(s.access))
return ret
diff --git a/test-suite/generated-src/swift/RecordWithNestedDerivings+Private.swift b/test-suite/generated-src/swift/RecordWithNestedDerivings+Private.swift
index 8d3a46a3..a2f921fd 100644
--- a/test-suite/generated-src/swift/RecordWithNestedDerivings+Private.swift
+++ b/test-suite/generated-src/swift/RecordWithNestedDerivings+Private.swift
@@ -7,16 +7,16 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum RecordWithNestedDerivingsMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.RecordWithNestedDerivings
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum RecordWithNestedDerivingsMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.RecordWithNestedDerivings
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let key = I32Marshaller.fromCpp(djinni.swift.getMember(p, 0))
let rec = RecordWithDerivingsMarshaller.fromCpp(djinni.swift.getMember(p, 1))
return SwiftType(key: key, rec: rec)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, I32Marshaller.toCpp(s.key))
djinni.swift.addMember(&ret, RecordWithDerivingsMarshaller.toCpp(s.rec))
diff --git a/test-suite/generated-src/swift/ReturnOne+Private.swift b/test-suite/generated-src/swift/ReturnOne+Private.swift
index bf26cd44..6f69316d 100644
--- a/test-suite/generated-src/swift/ReturnOne+Private.swift
+++ b/test-suite/generated-src/swift/ReturnOne+Private.swift
@@ -11,26 +11,26 @@ import TestSuiteCxx
final class ReturnOneCppProxy: DjinniSupport.CppProxy, TestSuite.ReturnOne {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
func returnOne() throws -> Int8 {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- var ret = djinni_generated.ReturnOne_returnOne(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ var ret = djinni_generated.ReturnOne_returnOne(&_params)
try handleCppErrors(&ret)
return I8Marshaller.fromCpp(ret)
}
}
-enum ReturnOneMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ReturnOne
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ReturnOneMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ReturnOne
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { ReturnOneCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
public class ReturnOne_statics {
- static func getInstance() throws -> TestSuite.ReturnOne {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.ReturnOne_getInstance(¶ms)
+ public static func getInstance() throws -> TestSuite.ReturnOne {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.ReturnOne_getInstance(&_params)
try handleCppErrors(&ret)
return ReturnOneMarshaller.fromCpp(ret)
}
diff --git a/test-suite/generated-src/swift/ReturnTwo+Private.swift b/test-suite/generated-src/swift/ReturnTwo+Private.swift
index 06fbf133..1040aa68 100644
--- a/test-suite/generated-src/swift/ReturnTwo+Private.swift
+++ b/test-suite/generated-src/swift/ReturnTwo+Private.swift
@@ -11,26 +11,26 @@ import TestSuiteCxx
final class ReturnTwoCppProxy: DjinniSupport.CppProxy, TestSuite.ReturnTwo {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
func returnTwo() throws -> Int8 {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- var ret = djinni_generated.ReturnTwo_returnTwo(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ var ret = djinni_generated.ReturnTwo_returnTwo(&_params)
try handleCppErrors(&ret)
return I8Marshaller.fromCpp(ret)
}
}
-enum ReturnTwoMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ReturnTwo
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ReturnTwoMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ReturnTwo
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { ReturnTwoCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
public class ReturnTwo_statics {
- static func getInstance() throws -> TestSuite.ReturnTwo {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.ReturnTwo_getInstance(¶ms)
+ public static func getInstance() throws -> TestSuite.ReturnTwo {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.ReturnTwo_getInstance(&_params)
try handleCppErrors(&ret)
return ReturnTwoMarshaller.fromCpp(ret)
}
diff --git a/test-suite/generated-src/swift/ReverseClientInterface+Private.swift b/test-suite/generated-src/swift/ReverseClientInterface+Private.swift
index 90e74b99..9f24d723 100644
--- a/test-suite/generated-src/swift/ReverseClientInterface+Private.swift
+++ b/test-suite/generated-src/swift/ReverseClientInterface+Private.swift
@@ -10,42 +10,42 @@ import TestSuiteCxx
final class ReverseClientInterfaceCppProxy: DjinniSupport.CppProxy, TestSuite.ReverseClientInterface {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
func returnStr() throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- var ret = djinni_generated.ReverseClientInterface_returnStr(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ var ret = djinni_generated.ReverseClientInterface_returnStr(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
func methTakingInterface(_ i: TestSuite.ReverseClientInterface) throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(ReverseClientInterfaceMarshaller.toCpp(i))
- var ret = djinni_generated.ReverseClientInterface_methTakingInterface(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(ReverseClientInterfaceMarshaller.toCpp(i))
+ var ret = djinni_generated.ReverseClientInterface_methTakingInterface(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
func methTakingOptionalInterface(_ i: Optional) throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(inst)
- params.addValue(OptionalMarshaller.toCpp(i))
- var ret = djinni_generated.ReverseClientInterface_methTakingOptionalInterface(¶ms)
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(inst)
+ _params.addValue(OptionalMarshaller.toCpp(i))
+ var ret = djinni_generated.ReverseClientInterface_methTakingOptionalInterface(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
}
-enum ReverseClientInterfaceMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.ReverseClientInterface
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum ReverseClientInterfaceMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.ReverseClientInterface
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { ReverseClientInterfaceCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
public class ReverseClientInterface_statics {
- static func create() throws -> TestSuite.ReverseClientInterface {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.ReverseClientInterface_create(¶ms)
+ public static func create() throws -> TestSuite.ReverseClientInterface {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.ReverseClientInterface_create(&_params)
try handleCppErrors(&ret)
return ReverseClientInterfaceMarshaller.fromCpp(ret)
}
diff --git a/test-suite/generated-src/swift/SampleInterface+Private.swift b/test-suite/generated-src/swift/SampleInterface+Private.swift
index 11f2bfe4..7a215df5 100644
--- a/test-suite/generated-src/swift/SampleInterface+Private.swift
+++ b/test-suite/generated-src/swift/SampleInterface+Private.swift
@@ -14,12 +14,12 @@ import TestSuiteCxx
final class SampleInterfaceCppProxy: DjinniSupport.CppProxy, TestSuite.SampleInterface {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
}
-enum SampleInterfaceMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.SampleInterface
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum SampleInterfaceMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.SampleInterface
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { SampleInterfaceCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
diff --git a/test-suite/generated-src/swift/SecondListener+Private.swift b/test-suite/generated-src/swift/SecondListener+Private.swift
index be010122..4969555d 100644
--- a/test-suite/generated-src/swift/SecondListener+Private.swift
+++ b/test-suite/generated-src/swift/SecondListener+Private.swift
@@ -8,12 +8,12 @@ import TestSuite
import TestSuiteCxx
/** Used for ObjC multiple inheritance tests */
-enum SecondListenerMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.SecondListener
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum SecondListenerMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.SecondListener
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { fatalError("n/a") })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
diff --git a/test-suite/generated-src/swift/SetRecord+Private.swift b/test-suite/generated-src/swift/SetRecord+Private.swift
index 68f19674..41e002f2 100644
--- a/test-suite/generated-src/swift/SetRecord+Private.swift
+++ b/test-suite/generated-src/swift/SetRecord+Private.swift
@@ -7,16 +7,16 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum SetRecordMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.SetRecord
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum SetRecordMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.SetRecord
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let set = SetMarshaller.fromCpp(djinni.swift.getMember(p, 0))
let iset = SetMarshaller.fromCpp(djinni.swift.getMember(p, 1))
return SwiftType(set: set, iset: iset)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, SetMarshaller.toCpp(s.set))
djinni.swift.addMember(&ret, SetMarshaller.toCpp(s.iset))
diff --git a/test-suite/generated-src/swift/SupportCopying+Private.swift b/test-suite/generated-src/swift/SupportCopying+Private.swift
index 6dd09de5..2699d1c3 100644
--- a/test-suite/generated-src/swift/SupportCopying+Private.swift
+++ b/test-suite/generated-src/swift/SupportCopying+Private.swift
@@ -7,15 +7,15 @@ import Foundation
import TestSuite
import TestSuiteCxx
-enum SupportCopyingMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.SupportCopying
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum SupportCopyingMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.SupportCopying
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return withUnsafePointer(to: c) { p in
let x = I32Marshaller.fromCpp(djinni.swift.getMember(p, 0))
return SwiftType(x: x)
}
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
var ret = djinni.swift.makeCompositeValue()
djinni.swift.addMember(&ret, I32Marshaller.toCpp(s.x))
return ret
diff --git a/test-suite/generated-src/swift/TestArray+Private.swift b/test-suite/generated-src/swift/TestArray+Private.swift
index 509d63f8..99cde923 100644
--- a/test-suite/generated-src/swift/TestArray+Private.swift
+++ b/test-suite/generated-src/swift/TestArray+Private.swift
@@ -10,41 +10,41 @@ import TestSuiteCxx
final class TestArrayCppProxy: DjinniSupport.CppProxy, TestSuite.TestArray {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
}
-enum TestArrayMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.TestArray
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum TestArrayMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.TestArray
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { TestArrayCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
public class TestArray_statics {
- static func testStringArray(_ a: Array) throws -> Array {
- var params = djinni.swift.ParameterList()
- params.addValue(ArrayMarshaller.toCpp(a))
- var ret = djinni_generated.TestArray_testStringArray(¶ms)
+ public static func testStringArray(_ a: Array) throws -> Array {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ArrayMarshaller.toCpp(a))
+ var ret = djinni_generated.TestArray_testStringArray(&_params)
try handleCppErrors(&ret)
return ArrayMarshaller.fromCpp(ret)
}
- static func testIntArray(_ a: Array) throws -> Array {
- var params = djinni.swift.ParameterList()
- params.addValue(ArrayMarshaller.toCpp(a))
- var ret = djinni_generated.TestArray_testIntArray(¶ms)
+ public static func testIntArray(_ a: Array) throws -> Array {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ArrayMarshaller.toCpp(a))
+ var ret = djinni_generated.TestArray_testIntArray(&_params)
try handleCppErrors(&ret)
return ArrayMarshaller.fromCpp(ret)
}
- static func testRecordArray(_ a: Array) throws -> Array {
- var params = djinni.swift.ParameterList()
- params.addValue(ArrayMarshaller.toCpp(a))
- var ret = djinni_generated.TestArray_testRecordArray(¶ms)
+ public static func testRecordArray(_ a: Array) throws -> Array {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ArrayMarshaller.toCpp(a))
+ var ret = djinni_generated.TestArray_testRecordArray(&_params)
try handleCppErrors(&ret)
return ArrayMarshaller.fromCpp(ret)
}
- static func testArrayOfArray(_ a: Array>) throws -> Array> {
- var params = djinni.swift.ParameterList()
- params.addValue(ArrayMarshaller>.toCpp(a))
- var ret = djinni_generated.TestArray_testArrayOfArray(¶ms)
+ public static func testArrayOfArray(_ a: Array>) throws -> Array> {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ArrayMarshaller>.toCpp(a))
+ var ret = djinni_generated.TestArray_testArrayOfArray(&_params)
try handleCppErrors(&ret)
return ArrayMarshaller>.fromCpp(ret)
}
diff --git a/test-suite/generated-src/swift/TestDuration+Private.swift b/test-suite/generated-src/swift/TestDuration+Private.swift
index 55ae27f9..91aeb8ce 100644
--- a/test-suite/generated-src/swift/TestDuration+Private.swift
+++ b/test-suite/generated-src/swift/TestDuration+Private.swift
@@ -10,153 +10,153 @@ import TestSuiteCxx
final class TestDurationCppProxy: DjinniSupport.CppProxy, TestSuite.TestDuration {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
}
-enum TestDurationMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.TestDuration
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum TestDurationMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.TestDuration
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { TestDurationCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
public class TestDuration_statics {
- static func hoursString(_ dt: Duration) throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(DurationMarshaller.toCpp(dt))
- var ret = djinni_generated.TestDuration_hoursString(¶ms)
+ public static func hoursString(_ dt: Duration) throws -> String {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(TestSuite.DurationMarshaller.toCpp(dt))
+ var ret = djinni_generated.TestDuration_hoursString(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
- static func minutesString(_ dt: Duration) throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(DurationMarshaller.toCpp(dt))
- var ret = djinni_generated.TestDuration_minutesString(¶ms)
+ public static func minutesString(_ dt: Duration) throws -> String {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(TestSuite.DurationMarshaller.toCpp(dt))
+ var ret = djinni_generated.TestDuration_minutesString(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
- static func secondsString(_ dt: Duration) throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(DurationMarshaller.toCpp(dt))
- var ret = djinni_generated.TestDuration_secondsString(¶ms)
+ public static func secondsString(_ dt: Duration) throws -> String {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(TestSuite.DurationMarshaller.toCpp(dt))
+ var ret = djinni_generated.TestDuration_secondsString(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
- static func millisString(_ dt: Duration) throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(DurationMarshaller.toCpp(dt))
- var ret = djinni_generated.TestDuration_millisString(¶ms)
+ public static func millisString(_ dt: Duration) throws -> String {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(TestSuite.DurationMarshaller.toCpp(dt))
+ var ret = djinni_generated.TestDuration_millisString(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
- static func microsString(_ dt: Duration) throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(DurationMarshaller.toCpp(dt))
- var ret = djinni_generated.TestDuration_microsString(¶ms)
+ public static func microsString(_ dt: Duration) throws -> String {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(TestSuite.DurationMarshaller.toCpp(dt))
+ var ret = djinni_generated.TestDuration_microsString(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
- static func nanosString(_ dt: Duration) throws -> String {
- var params = djinni.swift.ParameterList()
- params.addValue(DurationMarshaller.toCpp(dt))
- var ret = djinni_generated.TestDuration_nanosString(¶ms)
+ public static func nanosString(_ dt: Duration) throws -> String {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(TestSuite.DurationMarshaller.toCpp(dt))
+ var ret = djinni_generated.TestDuration_nanosString(&_params)
try handleCppErrors(&ret)
return StringMarshaller.fromCpp(ret)
}
- static func hours(_ count: Int32) throws -> Duration {
- var params = djinni.swift.ParameterList()
- params.addValue(I32Marshaller.toCpp(count))
- var ret = djinni_generated.TestDuration_hours(¶ms)
+ public static func hours(_ count: Int32) throws -> Duration {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(I32Marshaller.toCpp(count))
+ var ret = djinni_generated.TestDuration_hours(&_params)
try handleCppErrors(&ret)
- return DurationMarshaller.fromCpp(ret)
+ return TestSuite.DurationMarshaller.fromCpp(ret)
}
- static func minutes(_ count: Int32) throws -> Duration {
- var params = djinni.swift.ParameterList()
- params.addValue(I32Marshaller.toCpp(count))
- var ret = djinni_generated.TestDuration_minutes(¶ms)
+ public static func minutes(_ count: Int32) throws -> Duration {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(I32Marshaller.toCpp(count))
+ var ret = djinni_generated.TestDuration_minutes(&_params)
try handleCppErrors(&ret)
- return DurationMarshaller.fromCpp(ret)
+ return TestSuite.DurationMarshaller.fromCpp(ret)
}
- static func seconds(_ count: Int32) throws -> Duration {
- var params = djinni.swift.ParameterList()
- params.addValue(I32Marshaller.toCpp(count))
- var ret = djinni_generated.TestDuration_seconds(¶ms)
+ public static func seconds(_ count: Int32) throws -> Duration {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(I32Marshaller.toCpp(count))
+ var ret = djinni_generated.TestDuration_seconds(&_params)
try handleCppErrors(&ret)
- return DurationMarshaller.fromCpp(ret)
+ return TestSuite.DurationMarshaller.fromCpp(ret)
}
- static func millis(_ count: Int32) throws -> Duration {
- var params = djinni.swift.ParameterList()
- params.addValue(I32Marshaller.toCpp(count))
- var ret = djinni_generated.TestDuration_millis(¶ms)
+ public static func millis(_ count: Int32) throws -> Duration {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(I32Marshaller.toCpp(count))
+ var ret = djinni_generated.TestDuration_millis(&_params)
try handleCppErrors(&ret)
- return DurationMarshaller.fromCpp(ret)
+ return TestSuite.DurationMarshaller.fromCpp(ret)
}
- static func micros(_ count: Int32) throws -> Duration {
- var params = djinni.swift.ParameterList()
- params.addValue(I32Marshaller.toCpp(count))
- var ret = djinni_generated.TestDuration_micros(¶ms)
+ public static func micros(_ count: Int32) throws -> Duration {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(I32Marshaller.toCpp(count))
+ var ret = djinni_generated.TestDuration_micros(&_params)
try handleCppErrors(&ret)
- return DurationMarshaller.fromCpp(ret)
+ return TestSuite.DurationMarshaller.fromCpp(ret)
}
- static func nanos(_ count: Int32) throws -> Duration {
- var params = djinni.swift.ParameterList()
- params.addValue(I32Marshaller.toCpp(count))
- var ret = djinni_generated.TestDuration_nanos(¶ms)
+ public static func nanos(_ count: Int32) throws -> Duration {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(I32Marshaller.toCpp(count))
+ var ret = djinni_generated.TestDuration_nanos(&_params)
try handleCppErrors(&ret)
- return DurationMarshaller.fromCpp(ret)
+ return TestSuite.DurationMarshaller.fromCpp(ret)
}
- static func hoursf(_ count: Double) throws -> Duration {
- var params = djinni.swift.ParameterList()
- params.addValue(F64Marshaller.toCpp(count))
- var ret = djinni_generated.TestDuration_hoursf(¶ms)
+ public static func hoursf(_ count: Double) throws -> Duration {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(F64Marshaller.toCpp(count))
+ var ret = djinni_generated.TestDuration_hoursf(&_params)
try handleCppErrors(&ret)
- return DurationMarshaller.fromCpp(ret)
+ return TestSuite.DurationMarshaller.fromCpp(ret)
}
- static func minutesf(_ count: Double) throws -> Duration {
- var params = djinni.swift.ParameterList()
- params.addValue(F64Marshaller.toCpp(count))
- var ret = djinni_generated.TestDuration_minutesf(¶ms)
+ public static func minutesf(_ count: Double) throws -> Duration {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(F64Marshaller.toCpp(count))
+ var ret = djinni_generated.TestDuration_minutesf(&_params)
try handleCppErrors(&ret)
- return DurationMarshaller.fromCpp(ret)
+ return TestSuite.DurationMarshaller.fromCpp(ret)
}
- static func secondsf(_ count: Double) throws -> Duration {
- var params = djinni.swift.ParameterList()
- params.addValue(F64Marshaller.toCpp(count))
- var ret = djinni_generated.TestDuration_secondsf(¶ms)
+ public static func secondsf(_ count: Double) throws -> Duration {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(F64Marshaller.toCpp(count))
+ var ret = djinni_generated.TestDuration_secondsf(&_params)
try handleCppErrors(&ret)
- return DurationMarshaller.fromCpp(ret)
+ return TestSuite.DurationMarshaller.fromCpp(ret)
}
- static func millisf(_ count: Double) throws -> Duration {
- var params = djinni.swift.ParameterList()
- params.addValue(F64Marshaller.toCpp(count))
- var ret = djinni_generated.TestDuration_millisf(¶ms)
+ public static func millisf(_ count: Double) throws -> Duration {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(F64Marshaller.toCpp(count))
+ var ret = djinni_generated.TestDuration_millisf(&_params)
try handleCppErrors(&ret)
- return DurationMarshaller.fromCpp(ret)
+ return TestSuite.DurationMarshaller.fromCpp(ret)
}
- static func microsf(_ count: Double) throws -> Duration {
- var params = djinni.swift.ParameterList()
- params.addValue(F64Marshaller.toCpp(count))
- var ret = djinni_generated.TestDuration_microsf(¶ms)
+ public static func microsf(_ count: Double) throws -> Duration {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(F64Marshaller.toCpp(count))
+ var ret = djinni_generated.TestDuration_microsf(&_params)
try handleCppErrors(&ret)
- return DurationMarshaller.fromCpp(ret)
+ return TestSuite.DurationMarshaller.fromCpp(ret)
}
- static func nanosf(_ count: Double) throws -> Duration {
- var params = djinni.swift.ParameterList()
- params.addValue(F64Marshaller.toCpp(count))
- var ret = djinni_generated.TestDuration_nanosf(¶ms)
+ public static func nanosf(_ count: Double) throws -> Duration {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(F64Marshaller.toCpp(count))
+ var ret = djinni_generated.TestDuration_nanosf(&_params)
try handleCppErrors(&ret)
- return DurationMarshaller.fromCpp(ret)
+ return TestSuite.DurationMarshaller.fromCpp(ret)
}
- static func box(_ count: Int64) throws -> Optional {
- var params = djinni.swift.ParameterList()
- params.addValue(I64Marshaller.toCpp(count))
- var ret = djinni_generated.TestDuration_box(¶ms)
+ public static func box(_ count: Int64) throws -> Optional {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(I64Marshaller.toCpp(count))
+ var ret = djinni_generated.TestDuration_box(&_params)
try handleCppErrors(&ret)
- return OptionalMarshaller>.fromCpp(ret)
+ return OptionalMarshaller>.fromCpp(ret)
}
- static func unbox(_ dt: Optional) throws -> Int64 {
- var params = djinni.swift.ParameterList()
- params.addValue(OptionalMarshaller>.toCpp(dt))
- var ret = djinni_generated.TestDuration_unbox(¶ms)
+ public static func unbox(_ dt: Optional) throws -> Int64 {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(OptionalMarshaller>.toCpp(dt))
+ var ret = djinni_generated.TestDuration_unbox(&_params)
try handleCppErrors(&ret)
return I64Marshaller.fromCpp(ret)
}
diff --git a/test-suite/generated-src/swift/TestHelpers+Private.swift b/test-suite/generated-src/swift/TestHelpers+Private.swift
index da7c0a3c..64e4605d 100644
--- a/test-suite/generated-src/swift/TestHelpers+Private.swift
+++ b/test-suite/generated-src/swift/TestHelpers+Private.swift
@@ -15,267 +15,267 @@ import TestSuiteCxx
final class TestHelpersCppProxy: DjinniSupport.CppProxy, TestSuite.TestHelpers {
init(_ inst: djinni.swift.AnyValue) { super.init(inst:inst) }
}
-enum TestHelpersMarshaller: DjinniSupport.Marshaller {
- typealias SwiftType = TestSuite.TestHelpers
- static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
+public enum TestHelpersMarshaller: DjinniSupport.Marshaller {
+ public typealias SwiftType = TestSuite.TestHelpers
+ public static func fromCpp(_ c: djinni.swift.AnyValue) -> SwiftType {
return cppInterfaceToSwift(c, { TestHelpersCppProxy(c) as SwiftType })
}
- static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
+ public static func toCpp(_ s: SwiftType) -> djinni.swift.AnyValue {
return swiftInterfaceToCpp(s, { fatalError("n/a") })
}
}
public class TestHelpers_statics {
- static func getSetRecord() throws -> TestSuite.SetRecord {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.TestHelpers_getSetRecord(¶ms)
+ public static func getSetRecord() throws -> TestSuite.SetRecord {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.TestHelpers_getSetRecord(&_params)
try handleCppErrors(&ret)
return SetRecordMarshaller.fromCpp(ret)
}
- static func checkSetRecord(_ rec: TestSuite.SetRecord) throws -> Bool {
- var params = djinni.swift.ParameterList()
- params.addValue(SetRecordMarshaller.toCpp(rec))
- var ret = djinni_generated.TestHelpers_checkSetRecord(¶ms)
+ public static func checkSetRecord(_ rec: TestSuite.SetRecord) throws -> Bool {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(SetRecordMarshaller.toCpp(rec))
+ var ret = djinni_generated.TestHelpers_checkSetRecord(&_params)
try handleCppErrors(&ret)
return BoolMarshaller.fromCpp(ret)
}
- static func getPrimitiveList() throws -> TestSuite.PrimitiveList {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.TestHelpers_getPrimitiveList(¶ms)
+ public static func getPrimitiveList() throws -> TestSuite.PrimitiveList {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.TestHelpers_getPrimitiveList(&_params)
try handleCppErrors(&ret)
return PrimitiveListMarshaller.fromCpp(ret)
}
- static func checkPrimitiveList(_ pl: TestSuite.PrimitiveList) throws -> Bool {
- var params = djinni.swift.ParameterList()
- params.addValue(PrimitiveListMarshaller.toCpp(pl))
- var ret = djinni_generated.TestHelpers_checkPrimitiveList(¶ms)
+ public static func checkPrimitiveList(_ pl: TestSuite.PrimitiveList) throws -> Bool {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(PrimitiveListMarshaller.toCpp(pl))
+ var ret = djinni_generated.TestHelpers_checkPrimitiveList(&_params)
try handleCppErrors(&ret)
return BoolMarshaller.fromCpp(ret)
}
- static func getNestedCollection() throws -> TestSuite.NestedCollection {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.TestHelpers_getNestedCollection(¶ms)
+ public static func getNestedCollection() throws -> TestSuite.NestedCollection {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.TestHelpers_getNestedCollection(&_params)
try handleCppErrors(&ret)
return NestedCollectionMarshaller.fromCpp(ret)
}
- static func checkNestedCollection(_ nc: TestSuite.NestedCollection) throws -> Bool {
- var params = djinni.swift.ParameterList()
- params.addValue(NestedCollectionMarshaller.toCpp(nc))
- var ret = djinni_generated.TestHelpers_checkNestedCollection(¶ms)
+ public static func checkNestedCollection(_ nc: TestSuite.NestedCollection) throws -> Bool {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(NestedCollectionMarshaller.toCpp(nc))
+ var ret = djinni_generated.TestHelpers_checkNestedCollection(&_params)
try handleCppErrors(&ret)
return BoolMarshaller.fromCpp(ret)
}
- static func getMap() throws -> Dictionary {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.TestHelpers_getMap(¶ms)
+ public static func getMap() throws -> Dictionary {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.TestHelpers_getMap(&_params)
try handleCppErrors(&ret)
return MapMarshaller.fromCpp(ret)
}
- static func checkMap(_ m: Dictionary) throws -> Bool {
- var params = djinni.swift.ParameterList()
- params.addValue(MapMarshaller.toCpp(m))
- var ret = djinni_generated.TestHelpers_checkMap(¶ms)
+ public static func checkMap(_ m: Dictionary) throws -> Bool {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(MapMarshaller.toCpp(m))
+ var ret = djinni_generated.TestHelpers_checkMap(&_params)
try handleCppErrors(&ret)
return BoolMarshaller.fromCpp(ret)
}
- static func getEmptyMap() throws -> Dictionary {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.TestHelpers_getEmptyMap(¶ms)
+ public static func getEmptyMap() throws -> Dictionary {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.TestHelpers_getEmptyMap(&_params)
try handleCppErrors(&ret)
return MapMarshaller.fromCpp(ret)
}
- static func checkEmptyMap(_ m: Dictionary) throws -> Bool {
- var params = djinni.swift.ParameterList()
- params.addValue(MapMarshaller.toCpp(m))
- var ret = djinni_generated.TestHelpers_checkEmptyMap(¶ms)
+ public static func checkEmptyMap(_ m: Dictionary) throws -> Bool {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(MapMarshaller.toCpp(m))
+ var ret = djinni_generated.TestHelpers_checkEmptyMap(&_params)
try handleCppErrors(&ret)
return BoolMarshaller.fromCpp(ret)
}
- static func getMapListRecord() throws -> TestSuite.MapListRecord {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.TestHelpers_getMapListRecord(¶ms)
+ public static func getMapListRecord() throws -> TestSuite.MapListRecord {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.TestHelpers_getMapListRecord(&_params)
try handleCppErrors(&ret)
return MapListRecordMarshaller.fromCpp(ret)
}
- static func checkMapListRecord(_ m: TestSuite.MapListRecord) throws -> Bool {
- var params = djinni.swift.ParameterList()
- params.addValue(MapListRecordMarshaller.toCpp(m))
- var ret = djinni_generated.TestHelpers_checkMapListRecord(¶ms)
+ public static func checkMapListRecord(_ m: TestSuite.MapListRecord) throws -> Bool {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(MapListRecordMarshaller.toCpp(m))
+ var ret = djinni_generated.TestHelpers_checkMapListRecord(&_params)
try handleCppErrors(&ret)
return BoolMarshaller.fromCpp(ret)
}
- static func checkClientInterfaceAscii(_ i: TestSuite.ClientInterface) throws -> Void {
- var params = djinni.swift.ParameterList()
- params.addValue(ClientInterfaceMarshaller.toCpp(i))
- var ret = djinni_generated.TestHelpers_checkClientInterfaceAscii(¶ms)
+ public static func checkClientInterfaceAscii(_ i: TestSuite.ClientInterface) throws -> Void {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ClientInterfaceMarshaller.toCpp(i))
+ var ret = djinni_generated.TestHelpers_checkClientInterfaceAscii(&_params)
try handleCppErrors(&ret)
}
- static func checkClientInterfaceNonascii(_ i: TestSuite.ClientInterface) throws -> Void {
- var params = djinni.swift.ParameterList()
- params.addValue(ClientInterfaceMarshaller.toCpp(i))
- var ret = djinni_generated.TestHelpers_checkClientInterfaceNonascii(¶ms)
+ public static func checkClientInterfaceNonascii(_ i: TestSuite.ClientInterface) throws -> Void {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ClientInterfaceMarshaller.toCpp(i))
+ var ret = djinni_generated.TestHelpers_checkClientInterfaceNonascii(&_params)
try handleCppErrors(&ret)
}
- static func checkClientInterfaceArgs(_ i: TestSuite.ClientInterface) throws -> Void {
- var params = djinni.swift.ParameterList()
- params.addValue(ClientInterfaceMarshaller.toCpp(i))
- var ret = djinni_generated.TestHelpers_checkClientInterfaceArgs(¶ms)
+ public static func checkClientInterfaceArgs(_ i: TestSuite.ClientInterface) throws -> Void {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ClientInterfaceMarshaller.toCpp(i))
+ var ret = djinni_generated.TestHelpers_checkClientInterfaceArgs(&_params)
try handleCppErrors(&ret)
}
- static func checkEnumMap(_ m: Dictionary) throws -> Void {
- var params = djinni.swift.ParameterList()
- params.addValue(MapMarshaller.toCpp(m))
- var ret = djinni_generated.TestHelpers_checkEnumMap(¶ms)
+ public static func checkEnumMap(_ m: Dictionary) throws -> Void {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(MapMarshaller.toCpp(m))
+ var ret = djinni_generated.TestHelpers_checkEnumMap(&_params)
try handleCppErrors(&ret)
}
- static func checkEnum(_ c: TestSuite.Color) throws -> Void {
- var params = djinni.swift.ParameterList()
- params.addValue(ColorMarshaller.toCpp(c))
- var ret = djinni_generated.TestHelpers_checkEnum(¶ms)
+ public static func checkEnum(_ c: TestSuite.Color) throws -> Void {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(ColorMarshaller.toCpp(c))
+ var ret = djinni_generated.TestHelpers_checkEnum(&_params)
try handleCppErrors(&ret)
}
- static func tokenId(_ t: Optional) throws -> Optional {
- var params = djinni.swift.ParameterList()
- params.addValue(OptionalMarshaller.toCpp(t))
- var ret = djinni_generated.TestHelpers_tokenId(¶ms)
+ public static func tokenId(_ t: Optional) throws -> Optional {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(OptionalMarshaller.toCpp(t))
+ var ret = djinni_generated.TestHelpers_tokenId(&_params)
try handleCppErrors(&ret)
return OptionalMarshaller.fromCpp(ret)
}
- static func createCppToken() throws -> TestSuite.UserToken {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.TestHelpers_createCppToken(¶ms)
+ public static func createCppToken() throws -> TestSuite.UserToken {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.TestHelpers_createCppToken(&_params)
try handleCppErrors(&ret)
return UserTokenMarshaller.fromCpp(ret)
}
- static func checkCppToken(_ t: TestSuite.UserToken) throws -> Void {
- var params = djinni.swift.ParameterList()
- params.addValue(UserTokenMarshaller.toCpp(t))
- var ret = djinni_generated.TestHelpers_checkCppToken(¶ms)
+ public static func checkCppToken(_ t: TestSuite.UserToken) throws -> Void {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(UserTokenMarshaller.toCpp(t))
+ var ret = djinni_generated.TestHelpers_checkCppToken(&_params)
try handleCppErrors(&ret)
}
- static func cppTokenId(_ t: TestSuite.UserToken) throws -> Int64 {
- var params = djinni.swift.ParameterList()
- params.addValue(UserTokenMarshaller.toCpp(t))
- var ret = djinni_generated.TestHelpers_cppTokenId(¶ms)
+ public static func cppTokenId(_ t: TestSuite.UserToken) throws -> Int64 {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(UserTokenMarshaller.toCpp(t))
+ var ret = djinni_generated.TestHelpers_cppTokenId(&_params)
try handleCppErrors(&ret)
return I64Marshaller.fromCpp(ret)
}
- static func checkTokenType(_ t: TestSuite.UserToken, type: String) throws -> Void {
- var params = djinni.swift.ParameterList()
- params.addValue(UserTokenMarshaller.toCpp(t))
- params.addValue(StringMarshaller.toCpp(type))
- var ret = djinni_generated.TestHelpers_checkTokenType(¶ms)
+ public static func checkTokenType(_ t: TestSuite.UserToken, type: String) throws -> Void {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(UserTokenMarshaller.toCpp(t))
+ _params.addValue(StringMarshaller.toCpp(type))
+ var ret = djinni_generated.TestHelpers_checkTokenType(&_params)
try handleCppErrors(&ret)
}
- static func returnNone() throws -> Optional {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.TestHelpers_returnNone(¶ms)
+ public static func returnNone() throws -> Optional {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.TestHelpers_returnNone(&_params)
try handleCppErrors(&ret)
return OptionalMarshaller.fromCpp(ret)
}
- static func assortedPrimitivesId(_ i: TestSuite.AssortedPrimitives) throws -> TestSuite.AssortedPrimitives {
- var params = djinni.swift.ParameterList()
- params.addValue(AssortedPrimitivesMarshaller.toCpp(i))
- var ret = djinni_generated.TestHelpers_assortedPrimitivesId(¶ms)
+ public static func assortedPrimitivesId(_ i: TestSuite.AssortedPrimitives) throws -> TestSuite.AssortedPrimitives {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(AssortedPrimitivesMarshaller.toCpp(i))
+ var ret = djinni_generated.TestHelpers_assortedPrimitivesId(&_params)
try handleCppErrors(&ret)
return AssortedPrimitivesMarshaller.fromCpp(ret)
}
- static func idBinary(_ b: Data) throws -> Data {
- var params = djinni.swift.ParameterList()
- params.addValue(BinaryMarshaller.toCpp(b))
- var ret = djinni_generated.TestHelpers_idBinary(¶ms)
+ public static func idBinary(_ b: Data) throws -> Data {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(BinaryMarshaller.toCpp(b))
+ var ret = djinni_generated.TestHelpers_idBinary(&_params)
try handleCppErrors(&ret)
return BinaryMarshaller.fromCpp(ret)
}
- static func getAsyncResult() throws -> DJFuture {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.TestHelpers_getAsyncResult(¶ms)
+ public static func getAsyncResult() throws -> DjinniSupport.DJFuture {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.TestHelpers_getAsyncResult(&_params)
try handleCppErrors(&ret)
- return FutureMarshaller.fromCpp(ret)
+ return DjinniSupport.FutureMarshaller.fromCpp(ret)
}
- static func futureRoundtrip(_ f: DJFuture) throws -> DJFuture {
- var params = djinni.swift.ParameterList()
- params.addValue(FutureMarshaller.toCpp(f))
- var ret = djinni_generated.TestHelpers_futureRoundtrip(¶ms)
+ public static func futureRoundtrip(_ f: DjinniSupport.DJFuture) throws -> DjinniSupport.DJFuture {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(DjinniSupport.FutureMarshaller.toCpp(f))
+ var ret = djinni_generated.TestHelpers_futureRoundtrip(&_params)
try handleCppErrors(&ret)
- return FutureMarshaller.fromCpp(ret)
+ return DjinniSupport.FutureMarshaller.fromCpp(ret)
}
- static func asyncEarlyThrow() throws -> DJFuture {
- var params = djinni.swift.ParameterList()
- var ret = djinni_generated.TestHelpers_asyncEarlyThrow(¶ms)
+ public static func asyncEarlyThrow() throws -> DjinniSupport.DJFuture {
+ var _params = djinni.swift.ParameterList()
+ var ret = djinni_generated.TestHelpers_asyncEarlyThrow(&_params)
try handleCppErrors(&ret)
- return FutureMarshaller.fromCpp(ret)
+ return DjinniSupport.FutureMarshaller.fromCpp(ret)
}
- static func voidAsyncMethod(_ f: DJFuture) throws -> DJFuture {
- var params = djinni.swift.ParameterList()
- params.addValue(FutureMarshaller.toCpp(f))
- var ret = djinni_generated.TestHelpers_voidAsyncMethod(¶ms)
+ public static func voidAsyncMethod(_ f: DjinniSupport.DJFuture) throws -> DjinniSupport.DJFuture {
+ var _params = djinni.swift.ParameterList()
+ _params.addValue(DjinniSupport.FutureMarshaller